Adding upstream version 0.11.0.

upstream/0.11.0
Alf Gaida 8 years ago
parent 863b67f9bc
commit 5ca3b14245

3
.gitignore vendored

@ -0,0 +1,3 @@
build
lxqt-config.kdev4
*/translations/lxqt-config

@ -0,0 +1,501 @@
lxqt-config-0.11.0 / 2016-09-24
===============================
* appearance: Avoid blocking when setting wallpaper
* appearance: Do (not) change wallpaper with theme
* all: Remove XdgIcon & XdgIconLoader usage
* brightness: Add change confirmation dialog
* brightness: Correct indentation
* Update README.md
* Replaces deprecated QStyleOptionViewItemVx
* Add Catalan translations
* Add and Update Arabic Translations for Desktop Files
* lxqt-config-monitor: Correct loadsettings.cpp
* lxqt-config-monitor: Use QGuiApplication
* I18n: Fix Plural String (#94)
* fixed crash when selecting "extended view" while second monitor is off (#91)
* build: Add optional build for subcomponents
* lxqt-config-appearance: Fix a null pointer dereference (#93)
* Add README.md
* lxqt-config-brightness: Remove compiler warning
* lxqt-config-brightness: Add libxcb dependency
* lxqt-config-brightness: Use *_LDFLAGS in target_link_libraries
* lxqt-config-appearance: Use fewer XdgIcon* stuff (#92)
* lxqt-config-appearance: Use the new XdgIconLoader library (#90)
* build: Use external translations (#89)
* ts-files removal (#88)
* Use const references with the foreach iterator
* translations: russian translation update (#85)
* font config: make it possible to write custom fontconfig files (#83)
* view: Use icon/decoration size based on styling
* Set grid size according to font and icon sizes.
* lxqt-config-brightness: Use arrow keys to change settings.
* Desktop file translation to Spanish added.
* lxqt-config-brigness: Set brightness value by command line.
* Removed not needed LICENSE
* lxqt-config-brightness: Increase or decrease brightness using command line.
* Create lxqt-config-locale_it.desktop
* Rename from lxqt-config-brightness-settings to lxqt-config-brightness.
* lxqt-config-brightness-settings: Some files changes their licenses from GPL to LGPL.
* lxqt-config-brightness-settings lxqt translations module added.
* lxqt-config-brightness-settings added.
* fix typo skiping -> skipping
* build: Fix FTBFS by reverting the @a7220cb
* Bum year in AUTHORS
* lxqt-config-brightness-settings has been added. It can change brightness and gamma. It's a X11 tool because libKScreen can not change brightness or gamma yet.
* lxqt-config: Load/store window size on begin/end
* categorizedview: Use correct signature
* lxqt-config: Remove homemade "activation logic"
* Settings are saved in QSettings format instead JSON format.
* Set position widget used bad scale. The real widget size is not set until the widget is shown.
* Remove blue square in GUI position
* Fast options added.
* GUI only lets one primary output.
* Icons aren't installed.
* Check KScreen reply is OK. Changes in interface.
* liblxqt is used to write autostart entry.
* Don't track IDE settings
* KScreen is slow loading screen modes at starting. Wait for modes ready.
* KScreen sometimes changes id of modes. If mode exists and it is OK, settings will be applied.
* Save settings dialog added.
* Initial support for different paths of xkb base.lst in different OSes.
* A couple of bug fixes Check if the memory was allocated after malloc() and realloc() calls Fix typo
* Update german translation
* Fix warning on translation
* Replace slang with a more traditional wording
* build: Use CMAKE_INSTALL_FULL_LIBDIR for RPATH
* Fixes an FTBFS on lxqt-config-locale_ru.desktop
* Update Russian translations
* apearance: Support "System" theme preview
* Italian translation update
* lxqt-config: Add CTRL+Q shortcut for closing
*_hu.ts files updated, *hu_HU.ts files deleted
* Mkdir $XDG_CONFIG_HOME/autostart or ~/.config/autostart, if not exists.
* lxqt-config-appearance: Choose the icon with the matching size
0.10.0 / 2015-11-02
===================
* Update translations
* Fix license file
* Set saved settings at session start.
* lxqt-config-monitor: Correctly link to liblxqt
* lxqt-config-monitor: GUI for positioning
* lxqt-config-monito: Handle the clone combobox
* lxqt-config-monitor: Fix activation of second screen
* lxqt-config-monitor: Screen rotation
* lxqt-config-monitor: Tabs to spaces
* lxqt-config-monitor: Remove duplicate modes from list
* lxqt-config-monitor: Sort output modes
* lxqt-config-monitor: clean-up, old code removed
* lxqt-config-monitor: fix for reverting to previous configuration
* lxqt-config-monitor: refactoring and improvements
* lxqt-config-monitor: Use a separate combobox for clones
* lxqt-config-monitor: Actually update the config on setting screen position
* lxqt-config-monitor: Display EDID information in an additional tab
* lxqt-config-monitor: Attempt at an even simpler UI (#502)
* lxqt-config-monitor: Replace xrandr by KScreen
* lxqt-config-monitor: Remove backlight/brightness support
* Make the lxqt-config-locale chosen settings work
* Fix a few typos in file “info-for-developers.txt”
* Removed some compile warnings
* OnlyShowIn=LXQt;
* Add an option to automatically turn on numlock after login (implemented in lxqt-session).
* Initial support for locale config, based on formats KCMS.
* Rename LxQt to LXQt everywhere
* Update Greek (el) translation Remove country variant from language code
* lxqt-config: add correct rpath into lxqt-config-input & lxqt-config-appearance to find liblxqt-config-cursor.so installed into private directory
* Drop country-specific Italian translations
* Updated and created italian .desktop files
* Fix mouse settings persistency
* fixes lxde/lxqt #785 AUTHORS changed, list the used licenses LXQt license header added
* Description: Install private .so file into proper directory. Author: Andrew Lee (李健秋) <ajqlee@debian.org>
* Add copyright headers
* Handles CMake policy CMP0063
* Uses LXQtCompilerSettings CMake module
* Fix cursor settings location
* Updates translations sources
* CMake: Adds Runtime and Devel install COMPONENTs
* Coding style changes
* Removes unneeded include_directories() entries
* Use CMAKE_AUTORCC
* Get rid of qt5_wrap_cpp() MOC variables
* Use CMAKE_AUTOUIC
* Drops LIB_SUFFIX, use GNUInstallDirs
* fix build with qt 5.5
* Makes it compile in superbuild mode
* Updated german translation.
* Updates the build system to the Targets infrastructure
* polish regarding lxqt-config.desktop
* Remove trailing whitespaces
* Fix naming and links
* Include X-LXQt category in lxqt-config menu
* ApplyDialog renamed to SaveSettings.
* Rename and delete saved settings added.
* Bug always unify monitors fixed.
* lxqt-config-appearance: minimum configurable font size -> 4px
* Fix function name
* Update lxqt-config-input_it.ts
* Hungarian translations update, lxqt-config-monitor.desktop.in fixed
* Testing changes in the buttonbar of LxQt::ConfigDialog.
* Update Russian translation
* lxqt-configure-appearance: Reload icons from the user selected theme
* The last xrandr backend commit. Save settings added. Framebuffer screen size fixed.
* First save settings implementation.
* Update lxqt-config-cursor_it_IT.ts
* Framebuffer size is calculated on xrand backend.
* Update to keep up with our QIconLoader
* Added reset values.
* Remove testing parameters
* Apply page added
* Updated to LxQt::ConfigDialog.
* Added SVG icon for monitor in monitor position.
* Polish translation update
* Reorganizing the code. Support for long names in resolution modes .
* Reorganizing the code. Support for long names in resolution modes.
* Reorganizing the code. Support for long names in resolution modes.
* New modes name bug fixed.
* lxqt-config-appearance/icontheme: String performance enhancements
* Handles previews for inherited icon themes
* file-associations:Return from the busy cursor only after the Ui stuff ended
* Remove an unneeded dependency on KWindowSystem
0.9.0 / 2015-01-31
==================
* Delay loading of application icons in the app-chooser dialog for faster loading.
* Make the user aware of still ongoing work (Application Chooser)
* Bad English fixed
* Capitalize themes' names
* Create lxqt-config-monitor_it_IT.ts
* Update lxqt-config-appearance_it.desktop
* Added german translation for file association dialogue
* Added german translation for input device settings.
* Create lxqt-config-file-associations_it.ts
* Update lxqt-config-appearance_it.ts
* Update lxqt-config-appearance_it_IT.ts
* Added german translation for monitor settings.
* Update Japanese translation
* Fix PT desktop file names and paths.
* Portuguese language update
* Updates translations sources
* Documenting the code: Magnetic attraction without javascript.
* Magnetic attraction procedure has been documented.
* Added confirm dialog before saving.
* Added backlight control and position control button.
* Update lxqt-config-cursor_ja.ts
* - Unify naming for a unique lxqt. No more suffixes
* Write to mimeapps.list rather than defaults.list
* If directory ~/.config/autostart/ doesn't exists, it is created. Save doesn't close window.
* Use the new LxQt::SingleApplication
* Add windows icon
* CMakeLists code reformatting
* CMakeLists maintenance
* Renames .ts files that used _template in their name
* Moves and renames translations files around
* Uses the new translations cmake modules
* - Add option autohint - Fix compatibility with KDE fonts settings
* Activate System Settings items with enter key. Fixes lxde/lxde-qt#355
* Update Russian translation
* Drop Qt4 support in code
* Clean up CMakeLists.txt and drop Qt 4 support
0.8.0 / 2014-10-10
==================
* Adapts to translations infrastructure
* Option to set single-click as default and sigle-click handling in system settings' main window
* Qt4 and Qt5 compiling fixed
* Compiling in Qt4 fixed.
* Fix #273 - File fonts.conf is created as folder if doesn't exist.
* Make initial panel receive focus
* Adapt to use QtMimeTypes/XdgMimeType
* Restore translations.
* Use our custom TimeoutDialog to replace QProgressDialog and provide a "cancel" button and show better text in the progress bar.
* Little fix for the broken stacked widget.
* Replace the scrolled UI with a left list and a right stacked widget to provide usability.
* Don't use Qt QObject properties in mode changes. Use MonitorWidget class properties instead.
* Fixed: Some ugly code has been changed.
* Fixed: Error reading monitor name.
* Fixed: Restore position of monitor when user cancels settings.
* Fixed: If no relative monitor is selected, then position is disabled.
* Fixed: Disable position options when output is unified at start. Fixed: No cicles in relative positions at start.
* Fixed: Timeout dialog is now modal.
* Fixed: If monitor is turned off, brightness is set to 0. Fixed: Quick options close window on click.
* Read vendor from EDID.
* Fixed: Gamma error when monitor is turned off.
* Gamma control implemented.
* Added brightness control. Some bugs fixed reading xrandr properties.
* Little adjustment to the UI. Delete unused methods.
* Refactor the code, make things more OOP-style. * Slight adjustment to the UI.
* Add code to determine the position of monitors and their relationship on startup.
* Add a new parser for the output of "xrandr --verbose" to get more detailed monitor info, including gamma.
* Add initial translation support and an incomplete zh_TW locale to lxqt-config-monitor.
* Integrate the Makefile of lxqt-config-monitor to build it as part of lxqt-config.
* Move lxqt-config-monitor into a subdirectory.
* Use QWindow::windowHandle()->winId() to replace QWidget::winId() due to a bug of Qt5.
* Added: Save settings in autostart desktop file.
* Added timeout dialog. When settings are applied, a timeout dialog is shown. If user doesn't press "Yes" button, settings are restored.
* Monitor position can be changed. Outputs can be diferent. Position of outputs can be chosen. If system has got two monitors, wizard will be shown to config them.
* Modules for xrandr and GUI. Now new backends can be added.
* Split xrandr settings from UI.
* Readme updated.
* Remove all Glib dependencies.
* Initial commit
* Fix bug #242: lxqt-config-input: Mouse acceleration & sensitivity settings are not saved.
* Fix missing libxcb linking so building with llvm/clang now works.
* Fixes layout on the Fonts Config Ui
* Avoid putting system programs in "LXQt settings" category since they belong to "System settings".
* Add <OnlyUnallocated /> to lxqt-config.menu to avoid duplicated items in "Other Settings" section. This fixed lxde-qt bug #186.
* Rename lxqt-config-cursor to liblxqt-config-cursor since it's a library.
* Show cursors by using raw xcb calls since Qt5 does not support creating QCursor based on native cursor handle.
* Write Qt settings to lxqt.conf instead of the deprecated Trolltech.conf in Qt5.
* Make the code compile with both Qt4 and Qt5.
* Fix keyboard layout settings reading and writting
* Cleanup header style
* Use new LXQt header files.
* Use preferred header style.
* Make sure all enums are handled in switch
* Fix a null dereference
* Remove unnecessary use of alloca, which is not portable.
0.7.0 / 2014-05-07
==================
* Mention lxqt-config-cursor in AUTHORS
* Include some optional components in LXQt settings.
* Remove duplicate COPYING file
* Update COPYING
* Update categories to match proper ones in .desktop files
* String changes LxQt -> LXQt and LXDE-Qt -> LXQt without refactoring classes, namespaces and so on
* removal of old templates in translations
0.6.99 / 2014-05-01
===================
* Update manpages
* Update AUTHORS
* Add CPack rules for creating tarball
* config-input: Fix a typo
* Preserve the config values in lxqt-session config file. * Support setting key used to switch layouts.
* Add keys used to switch layout to the combox box.
* Add very primitive support for settings keyboard layout via setxkbmap.
* Add a basic skeleton for keyboard layout settings.
* lxqt-config-file-associations: Wording in main window
* Assorted improvements to .desktop files
* Man page improvements
* Correctly save the cursor theme name to lxqt session config file.
* Correctly write current cursor theme name to ~/.icons/default/index.theme. Deprecate the use of XCURSOR_THEME environment variable.
* Support changing double click interval, whell scroll lines, and cursor flash time for Qt programs. Little adjustment of UI.
* Fix incorrect linking to liblxqt-config-cursor.
* Add missing desktop entry file for lxqt-config-input. Some cleanup.
* Rename lxqt-config-mouse to lxqt-config-cursor to reflect what it does. Remove unnecessary desktop entry files and do some makefile cleanup.
* Try to integrate lxqt-config-appearance with lxqt-config-mouse so we can select cursor themes in lxqt-config-appearance, too.
* Total redesign of lxqt-config-input using LxQt::ConfigDialog and integrate lxqt-config-mouse.
* Fix lxqt-config-appearance: write config files on widget destruction properly
* Fix dpi settings and add a timeout to 1.5 sec delay to writing fontconfig file.
* Read/write ~/.config/fontconfig/fonts.conf file for settings antialias, hinting, and dpi.
* Write a fontconfig config file to ~/.config/fonts.conf at the same time.
* Fix bugs in font configurations
* Try to add very basic font configurations
* Add support for toolbar button styles and single click activation for item views
* Add support for Qt style selection to lxqt-config-appearance.
* Removed CMAKE_SOURCE_DIR usage from CMakeLists.txt files
* Fix XDG_MENU_PREFIX and use correct config.menu file.
* Support changing the wallpaper of pcmanfm-qt.
* Fix renaming bugs, replacing lxqt-qt with lxde-qt
* Finish the crazy razor=>lxqt renaming tasks.
* Fix wrong config name.
* Project name added to cmake file
* Fix wrong Exec lines in desktop entry files.
* Fix broken build and rename binaries to lxqt-config-*.
* Add COPYING file for razor-config-mouse since it's GPL'd rather than using LGPL.
* Add COPYING and AUTHORS
* Make razor-config-fileassociations compile with qt 4.6
* Corrected include line in mimetypeviewer.cpp
* X-RAZOR changed to Razor in desktop files
* Make config-file-associations dialogs appear faster
* config-file-associations: removed placeholder text from search field
* config-file-associations: add search icon to search lineedit
* Removed heading from mimetypeviewer in config-file-associations
* razor-config-file-associations: Set focus correctly when opening applicationchooser
* razor-config-file-associations: remove connect to nonexisting ok-slot
* razor-config-file-associations: clean up qDebug lines
* config-file-associations, clear mimeinfo frames in mimetypeviewer, when no mimetype chosen
* Sorting of applications in config-file-associations
* config-file-associations adapt detection of applications to xdg-mime behavior
* razor-config: load model content after the window appears on screen (we need to provide some user feedback immediately)
* config-file-associations, mimetypeviewer: change tab-order and initial focus
* Added search functionality to config-file-associations, MimetypeViewer
* config-file-associations, mimetypeviewer: Replaced QTreeWidget with QTreeView and new class MimetypeItemModel as model
* config-file-associations: minor changes to mimetypeviewer looks
* config-file-associations: Changed application listwidget back to treewidget, and dropped \handles\ listwidget
* Improved (hopefuly) layout and look of config-fileassociations, application chooser
* config-file-associations: changed treewidget to listwidget in applicationchooser
* razor-config-file-associations, improved layout for mimetype-viewer
* Added application razor-config-file-associations
* fixed appearance icons display + huge filesystem access optimization in this area
* Update fixes for qcategorizedview
* Make config center icon labels not wrap as much
* fixed #488 Display a message if no cursor theme is found
* Fix various build falures
* Add translation support for qtconfig entry
* preliminary manpages primary for razorqt and usefully in venenux
* Suppressed warning "variable «currSize» set but not used" in the razorqt-config/src/qcategorizedview/qcategorizedview.cpp:496:29
* Suppressed warning "variable «currSize» set but not used" in the razorqt-config/src/qcategorizedview/qcategorizedview.cpp:496:29
* Translations updated
* Translations updated
* Translations
* Delete bad en_GB translations
* Install translations into correct places
* Update translations
* Enable translations for some components that were missing them
* Minor fixes
* Translations updated
* Removed line num from TS files.
* razor-config: wrap text
* Make it possible to build modules separately
* Translations
* Deleted old translation methods.
* New translation infrastructure
* Translation for razor-config-appearance
* Fix for Issue #290 Fails to build on BSD
* Updated ts.src files
* removed useles window title
* fixed #336: remove the "razor" prefix from razor-config dialog
* config app for notifications
* Remove RazorNotification classes (no license/copyright)
* add module names to includes and tidy up the coding style
* Update razorqt-config/razor-config-mouse/thememodel.h
* Update razorqt-config/razor-config-mouse/selectwnd.h
* Update razorqt-config/razor-config-mouse/previewwidget.h
* Update razorqt-config/razor-config-mouse/itemdelegate.h
* Update razorqt-config/razor-config-mouse/crtheme.h
* fix coding style errors
* fix coding style errors
* fix coding style errors
* fix coding style errors
* fix coding style errors
* fix coding style errors
* fix coding style errors
* fix coding style errors
* Ts.src files updated.
* add module name to include
* add module names to includes
* add module names to includes and fix style errors
* fix coding style errors
* add module names to includes
* add module names to includes
* add module names to includes
* add module names to includes
* Language name zh_CN.GB2312 braked cmake process.
* Translations updated
* Environments should be "Razor", not "RAZOR" Thanks Alec Moskvin
* Renames razor-config-notificationd window title
* Small fixes in the razor-config-appearance Thanks PICCORO Lenz McKAY. still need some fixeds: iconthemeconfig.h:38: error: expected class-name before { token and also the moc ui_mainwindow.h must be renamed too in iconthemeconfig.h
* Fix header
* Small fixes in the razor-config-appearance
* razor-config GUI improvement
* razor-config based on XDG Desktop Menu Specification 2
* fixed #261 Fix missing icons in razor config center
* default arguments for notification client lib
* quick compilation fix
* razor-config based on XDG Desktop Menu Specification
* Composition on by default
* GUI for change razor theme.
* Fixing cmake error
* fixed wrongly set license for new files. It's LGPL2+
* much better razor-config layout for icons
* config center: align icons into grid; do not show self; OnlyShowIn check
* reworked config stuff. No more special config registering. All 'Settings' desktop files are displayed in razor-config (grouped)
* Typos in code. Thanks Aaron Lewis. * In razor-runner , providers item: title() was typed as tile() * For RazorSettings class , settingsChanged() was typed as settigsChanged()
* Minor modifications and code cleanup
* Minor ui modifications. Moving default icon to notificationd instead of widget notification
* Setting min & max position according to QDesktopWidget
* Changing notification ui. Adding default notitifaction icon. Embedding icons in notification
* Properly install config Correct desktop file
* Proper default values
* Proper id number assigned to notifications Properly remove notification by quint32 id
* Proper configuration
* Rename file to match class name
* Remove custom settings, use razor ones
* Adding razor-config-notificationd
* tweaks for qtconfig installation
* qtconfig for razor-config
* Transifex desktop: sr_BA.ts should be a local
* Transifex desktop: local translations
* Transifex desktop: cmake files
* Transifex desktop: Translations pulled
* Transifex desktop: Reomove translations from desktop.in
* Transifex desktop: desktop->desktop.in
* Update Tradidtional Chinese Translations
* Add Traditional Chinese Translations
* Translations update
* Added support for the online translation service. www.transifex.net
* RazorApplication class implemented; all modules ported to this class
* fixed #76: razor-config should respect mouse behaviour
* Serbian translation files
* Serbian translations (2 variants)
* Greek translation by iosifidis
* Added danish translations
* Russian translation
* fix #169: italian translation
* Add function to use alternative icons
* Relicense
* Convert Appearance dialog to use RazorConfigDialog
* Fix gmail.ru -> gmail.com
* Czech translations (cs_CZ) Desktop files
* fixed #138: system settings icons
* SVK translation finalized
* Initial german [de] translation
* Close Issue #120
* License audit
* Add Chinese(simplified) translation files.
* License audit
* HU translation by Kristóf Kiszel
* Initial spanish translation
* Add Slovak (sk) translation
* Removes one empty line from .desktop file
* Adds newline to the end of .desktop files
* Czech translations (cs_CZ)
* Fix a few typos
* XdgDesktopFile is implicitly shared
* huge refactoring of the libraries build organization
* config mouse: close button as in the other tools
* Razor-config-appearance: incorrect translation path
* config: better item layouting in razor-config
* config appearance: make icons fully visible
* Razor-config: Fixes for razor-config-appearance
* Razor-config: New razor-config-appearance
* Razor-config: New razor-config-appearance
* display icon theme fixes
* forgotten debugs
* config icons: show progress when it searches for themes
* icon theme config - initial revision
* Razor-config-mouse: Added check for zlib in CMakeLists.txt
* moc warnings cleanup
* GPL->LGPL where I'm the author
* config: remove toolbars
* Polish translation part X
* Fix: Desktop Menu Specification category must be X-RAZOR.
* Russian translations
* unify razor-config look
* Added razor-application.menu
* razor-config can open items by Enter key too
* fixed desktop files
* fix donfig desktp files install for rpm
* razor-config-mousetheme -> razor-config-mouse rename
* do not use direct lib name for X11 stuff
* issue #37 - Config-mousetheme show not all themes, my KDE show 6 themes but razor only 1. (mHidden attribute fixed)
* homepage updated + auto replacement script
* adding missing libraries to fedora build
* show only in RAZOR; close/undo changes actions
* small refactoring in mouse config
* fixed #35: razor-config-mousetheme saves are not persistent
* final fix for build error #34
* potential fix for #34
* mouse theme configurator
* fix for #33: razorqt doesn't build
* config tools are registered in config center; desktop file for CC
* initial revision of "config tool". Very simple but functional.

@ -1,33 +1,77 @@
## lxqt-config # lxqt-config
This repository is providing several tools involved in the configuration of both LXQt and the underlying operating ## Overview
system.
It is comprising several tiny GUIs meant to configure a distinct functionality of LXQt that is stated in their title This repository is providing several tools involved in the configuration of both LXQt and the underlying operating system.
bar and can be derived from the binary name as well.
E. g. there's a GUI "LXQt Appearance Configuration", binary `lxqt-config-appearance`, that can be used to configure
the general appearance of LXQt, namely stuff like icon and LXQt theme or fonts.
![lxqt-config-appearance](lxqt-config-appearance.png) On the one hand it is featuring several GUI tools to configure topics like general appearance, pointer devices or screen resolutions.
On the other hand there's a GUI "Configuration Center" which summarizes all those configuration tools as well as counterparts of other LXQt components or third-party applications.
The "Monitor Settings", binary `lxqt-config-monitor`, allow for adjusting screen resolutions, positioning of screens ### Configuration GUI tools
and the likes.
![lxqt-config-monitor](lxqt-config-monitor.png) #### LXQt Appearance Configuration
In "LXQt Session Settings", binary `lxqt-config-session` topics affecting the LXQt session itself can be configured, e. g. Appearance of LXQt, that is topics like icon and LXQt theme or fonts.
applications to be launched at the beginning or dedicated directories according to
[xdg-user-dirs](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/).
![lxqt-config-session](lxqt-config-session.png) ![LXQt Appearance Configuration (lxqt-config-appearance)](lxqt-config-appearance.png)
The other main component is the so-called "Configuration Center", binary `lxqt-config`. Binary `lxqt-config-appearance`.
It's a GUI hosting configuration tools like the ones mentioned above but not limited to those. Several other LXQt
components like [lxqt-notificationd](https://github.com/lxde/lxqt-notificationd) come with their own configuration GUIs
which are placed in the "Configuration Center" as well. [lxqt-admin](https://github.com/lxde/lxqt-admin) is providing tools
similar to those depicted above but meant to configure parts of the underlying OS. In fact any arbitrary application may
place its tools within the "Configuration Center". This can be seen in the following screenshot where it's featuring icon
"Connman UI Setup" which belongs to [cmst](https://github.com/andrew-bibb/cmst) and "SDDM Configuration" which belongs to
[sddm-config-editor](https://github.com/hagabaka/sddm-config-editor).
![lxqt-config](lxqt-config.png) #### Brightness
Brightness settings of output devices.
Technically colors are adjusted to simulate varying brightness if the system LXQt is running on doesn't allow for adjusting the brightness itself.
Binary `lxqt-config-brightness`.
#### File Associations
Assigns MIME types to applications used to handle them. Not too user-friendly so far, see e. g. discussion in https://github.com/lxde/lxqt/issues/433.
Binary `lxqt-config-file-associations`.
#### Keyboard and Mouse
Configures hardware of pointer devices. Settings like repeat delay and interval of keyboards or acceleration of pointer devices.
Binary `lxqt-config-input`.
#### Locale
Locale used within LXQt sessions. Basically this GUI sets the well-known environment variables like `LANG` or `LC_*`. The settings apply to the session as a whole, that is to applications running within LXQt sessions but not belonging to LXQt, too.
Binary `lxqt-config-locale`.
#### Monitor Settings
Adjusts screen resolutions, positioning of screens and the likes.
Binary `lxqt-config-monitor`.
### Configuration Center
The "Configuration Center" (binary `lxqt-config`) is summarizing and providing various configuration GUIs.
![Configuration Center (lxqt-config)](lxqt-config.png)
First of all these are the ones belonging to repository lxqt-config described [above](https://github.com/pmattern/lxqt-config#configuration-gui-tools). Next, it is hosting counterparts of several other LXQt components like "Desktop Notifications" of [lxqt-notificationd](https://github.com/lxde/lxqt-notificationd), "Shortcut Keys" of [lxqt-globalkeyshortcuts](https://github.com/lxde/lxqt-globalkeyshortcuts) or the tools provided by [lxqt-admin](https://github.com/lxde/lxqt-admin). Third-party applications can include their configuration tools in "Configuration Center", too. This applies e. g. to "Connman UI Setup" of [cmst](https://github.com/andrew-bibb/cmst) or "SDDM Configuration" of [sddm-config-editor](https://github.com/hagabaka/sddm-config-editor).
## Installation
### Compiling source code
Runtime dependencies are Xcursor, qtsvg, KScreen and [liblxqt](https://github.com/lxde/liblxqt).
Additional build dependencies are CMake and optionally Git to pull latest VCS checkouts. The localization files were outsourced to repository [lxqt-l10n](https://github.com/lxde/lxqt-l10n) so the corresponding dependencies are needed, too. Please refer to this repository's `README.md` for further information.
Code configuration is handled by CMake. CMake variable `CMAKE_INSTALL_PREFIX` has to be set to `/usr` on most operating systems, depending on the way library paths are dealt with on 64bit systems variables like `CMAKE_INSTALL_LIBDIR` may have to be set as well.
To build run `make`, to install `make install` which accepts variable `DESTDIR` as usual.
### Binary packages
The library is provided by all major Linux distributions like Arch Linux, Debian (as of Debian stretch only), Fedora and openSUSE. Just use your package manager to search for string `lxqt-config`.
## Usage
Both the various configuration tools and the Configuration Center can be launched from the panel's main menu - Preferences - LXQt settings. Obviously the former can be launched from the latter, too.

@ -106,7 +106,7 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
QColor textcol = option.palette.color(foregroundRole(option, index)); QColor textcol = option.palette.color(foregroundRole(option, index));
// Draw the background // Draw the background
QStyleOptionViewItemV4 opt = option; QStyleOptionViewItem opt = option;
QStyle *style = opt.widget ? opt.widget->style() : QApplication::style(); QStyle *style = opt.widget ? opt.widget->style() : QApplication::style();
style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, painter, opt.widget); style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, painter, opt.widget);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 29 KiB

@ -31,68 +31,9 @@
* END_COMMON_COPYRIGHT_HEADER */ * END_COMMON_COPYRIGHT_HEADER */
#include "iconthemeinfo.h" #include "iconthemeinfo.h"
#include <QDebug>
#include <private/xdgiconloader/xdgiconloader_p.h>
#include <QStringBuilder>
#define PREVIEW_ICON_SIZE 22 #define PREVIEW_ICON_SIZE 22
/*
* This algorithm is defined by the freedesktop spec:
* http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
*/
static bool directoryMatchesSize(const XdgIconDirInfo &dir, int iconsize)
{
if (dir.type == XdgIconDirInfo::Fixed) {
return dir.size == iconsize;
} else if (dir.type == XdgIconDirInfo::Scalable) {
return dir.size <= dir.maxSize &&
iconsize >= dir.minSize;
} else if (dir.type == XdgIconDirInfo::Threshold) {
return iconsize >= dir.size - dir.threshold &&
iconsize <= dir.size + dir.threshold;
}
Q_ASSERT(1); // Not a valid value
return false;
}
/*
* This algorithm is defined by the freedesktop spec:
* http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
*/
static int directorySizeDistance(const XdgIconDirInfo &dir, int iconsize)
{
if (dir.type == XdgIconDirInfo::Fixed) {
return qAbs(dir.size - iconsize);
} else if (dir.type == XdgIconDirInfo::Scalable) {
if (iconsize < dir.minSize)
return dir.minSize - iconsize;
else if (iconsize > dir.maxSize)
return iconsize - dir.maxSize;
else
return 0;
} else if (dir.type == XdgIconDirInfo::Threshold) {
if (iconsize < dir.size - dir.threshold)
return dir.minSize - iconsize;
else if (iconsize > dir.size + dir.threshold)
return iconsize - dir.maxSize;
else return 0;
}
Q_ASSERT(1); // Not a valid value
return INT_MAX;
}
IconThemeInfo::IconThemeInfo(const QDir &dir): IconThemeInfo::IconThemeInfo(const QDir &dir):
mValid(false), mValid(false),
mHidden(false) mHidden(false)
@ -125,44 +66,15 @@ void IconThemeInfo::load(const QString &fileName)
QVector<QIcon> IconThemeInfo::icons(const QStringList &iconNames) const QVector<QIcon> IconThemeInfo::icons(const QStringList &iconNames) const
{ {
QVector<QIcon> icons; QVector<QIcon> icons;
QString current_theme = QIcon::themeName();
XdgIconLoader::instance()->setThemeName(mName); QIcon::setThemeName(mName);
foreach (const QString &i, iconNames) { for (const auto & i : iconNames)
QThemeIconInfo info = XdgIconLoader::instance()->loadIcon(i); {
if (!info.entries.isEmpty()) { icons.push_back({QIcon::fromTheme(i).pixmap({PREVIEW_ICON_SIZE, PREVIEW_ICON_SIZE})});
const int numEntries = info.entries.size();
// Search for exact matches first
bool found = false;
for (int i = 0; i < numEntries; ++i) {
XdgIconLoaderEngineEntry *entry = info.entries.at(i);
if (directoryMatchesSize(entry->dir, PREVIEW_ICON_SIZE)) {
icons.append(QIcon(entry->filename));
found = true;
break;
}
}
if (!found) { // No exact match. Search for an approximation
// Find the minimum distance icon
int minimalSize = INT_MAX;
XdgIconLoaderEngineEntry *closestMatch = 0;
for (int i = 0; i < numEntries; ++i) {
XdgIconLoaderEngineEntry *entry = info.entries.at(i);
int distance = directorySizeDistance(entry->dir, PREVIEW_ICON_SIZE);
if (distance < minimalSize) {
minimalSize = distance;
closestMatch = entry;
}
}
if (closestMatch)
icons.append(QIcon(closestMatch->filename));
else
icons.append(QIcon());
}
} else {
icons.append(QIcon());
}
} }
XdgIconLoader::instance()->setThemeName(QString());
QIcon::setThemeName(current_theme);
return icons; return icons;
} }

@ -28,7 +28,7 @@
#include "lxqtthemeconfig.h" #include "lxqtthemeconfig.h"
#include "ui_lxqtthemeconfig.h" #include "ui_lxqtthemeconfig.h"
#include <QTreeWidget> #include <QTreeWidget>
#include <QDebug> #include <QStandardPaths>
#include <QProcess> #include <QProcess>
#include <QItemDelegate> #include <QItemDelegate>
#include <QPainter> #include <QPainter>
@ -55,6 +55,19 @@ protected:
} }
}; };
/*!
* \brief Check if currently configured wallpaper (read from pcmanfm-qt's
* settings) is the same as \param themeWallpaper
*/
static bool isWallpaperChanged(const QString & themeWallpaper)
{
static const QString config_path = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation)
+ QStringLiteral("/pcmanfm-qt/lxqt/settings.conf");
static const QString wallpaper_key = QStringLiteral("Desktop/Wallpaper");
const QString current_wallpaper = QSettings{config_path, QSettings::IniFormat}.value(wallpaper_key).toString();
return themeWallpaper != current_wallpaper;
}
LXQtThemeConfig::LXQtThemeConfig(LXQt::Settings *settings, QWidget *parent) : LXQtThemeConfig::LXQtThemeConfig(LXQt::Settings *settings, QWidget *parent) :
QWidget(parent), QWidget(parent),
ui(new Ui::LXQtThemeConfig), ui(new Ui::LXQtThemeConfig),
@ -68,6 +81,10 @@ LXQtThemeConfig::LXQtThemeConfig(LXQt::Settings *settings, QWidget *parent) :
connect(ui->lxqtThemeList, SIGNAL(itemClicked(QTreeWidgetItem*,int)), connect(ui->lxqtThemeList, SIGNAL(itemClicked(QTreeWidgetItem*,int)),
this, SLOT(lxqtThemeSelected(QTreeWidgetItem*,int))); this, SLOT(lxqtThemeSelected(QTreeWidgetItem*,int)));
connect(ui->wallpaperOverride, &QAbstractButton::toggled, [this] (bool checked) {
if (checked)
lxqtThemeSelected(ui->lxqtThemeList->currentItem(), 0/*not used*/);
});
QList<LXQt::LXQtTheme> themes = LXQt::LXQtTheme::allThemes(); QList<LXQt::LXQtTheme> themes = LXQt::LXQtTheme::allThemes();
@ -119,19 +136,17 @@ void LXQtThemeConfig::lxqtThemeSelected(QTreeWidgetItem* item, int column)
if (!item) if (!item)
return; return;
LXQt::LXQtTheme currentTheme{mSettings->value("theme").toString()};
QVariant themeName = item->data(0, Qt::UserRole); QVariant themeName = item->data(0, Qt::UserRole);
mSettings->setValue("theme", themeName); mSettings->setValue("theme", themeName);
LXQt::LXQtTheme theme(themeName.toString()); LXQt::LXQtTheme theme(themeName.toString());
if(theme.isValid()) { if(theme.isValid()) {
QString wallpaper = theme.desktopBackground(); QString wallpaper = theme.desktopBackground();
if(!wallpaper.isEmpty()) { if(!wallpaper.isEmpty() && (ui->wallpaperOverride->isChecked() || !isWallpaperChanged(currentTheme.desktopBackground()))) {
// call pcmanfm-qt to update wallpaper // call pcmanfm-qt to update wallpaper
QProcess process;
QStringList args; QStringList args;
args << "--set-wallpaper" << wallpaper; args << "--set-wallpaper" << wallpaper;
process.start("pcmanfm-qt", args, QIODevice::NotOpen); QProcess::startDetached("pcmanfm-qt", args);
process.waitForFinished();
} }
} }
} }

@ -51,6 +51,13 @@
</column> </column>
</widget> </widget>
</item> </item>
<item>
<widget class="QCheckBox" name="wallpaperOverride">
<property name="text">
<string>Override user-defined wallpaper</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<resources/> <resources/>

@ -1,4 +1,4 @@
# Translations # Translations
Comment[ar]=تهيئة مظهر سطح المكتب ريزر Comment[ar]=إعدادات مظهر لكسكيوت
GenericName[ar]=تهيئة مظهر ريزر GenericName[ar]=إعدادات المظهر
Name[ar]=تهيئة مظهر ريزر Name[ar]=المظهر

@ -0,0 +1,4 @@
# Translations
Name[ca]=Aparença
GenericName[ca]=Ajusts de l'aparença
Comment[ca]=Ajusts de l'aparença per a LXQt

@ -18,7 +18,8 @@
#include "brightnesssettings.h" #include "brightnesssettings.h"
#include "outputwidget.h" #include "outputwidget.h"
#include <QDebug> #include <QMessageBox>
#include <QPushButton>
BrightnessSettings::BrightnessSettings(QWidget *parent):QDialog(parent) BrightnessSettings::BrightnessSettings(QWidget *parent):QDialog(parent)
{ {
@ -26,22 +27,75 @@ BrightnessSettings::BrightnessSettings(QWidget *parent):QDialog(parent)
ui->setupUi(this); ui->setupUi(this);
mBrightness = new XRandrBrightness(); mBrightness = new XRandrBrightness();
QList<MonitorInfo> monitors = mBrightness->getMonitorsInfo(); mMonitors = mBrightness->getMonitorsInfo();
for(MonitorInfo monitor: monitors) for(MonitorInfo monitor: mMonitors)
{ {
OutputWidget *output = new OutputWidget(monitor, this); OutputWidget *output = new OutputWidget(monitor, this);
ui->layout->addWidget(output); ui->layout->addWidget(output);
output->show(); output->show();
connect(output, SIGNAL(changed(MonitorInfo)), this, SLOT(monitorSettingsChanged(MonitorInfo))); connect(output, SIGNAL(changed(MonitorInfo)), this, SLOT(monitorSettingsChanged(MonitorInfo)));
connect(this, &BrightnessSettings::monitorReverted, output, &OutputWidget::setRevertedValues);
} }
mConfirmRequestTimer.setSingleShot(true);
mConfirmRequestTimer.setInterval(1000);
connect(&mConfirmRequestTimer, &QTimer::timeout, this, &BrightnessSettings::requestConfirmation);
} }
void BrightnessSettings::monitorSettingsChanged(MonitorInfo monitor) void BrightnessSettings::monitorSettingsChanged(MonitorInfo monitor)
{ {
QList<MonitorInfo> monitors; mBrightness->setMonitorsSettings(QList<MonitorInfo>{} << monitor);
monitors.append(monitor); if (ui->confirmCB->isChecked())
mBrightness->setMonitorsSettings(monitors); {
mConfirmRequestTimer.start();
} else
{
for (auto & m : mMonitors)
{
if (m.id() == monitor.id() && m.name() == monitor.name())
{
m.setBacklight(monitor.backlight());
m.setBrightness(monitor.brightness());
}
}
}
} }
void BrightnessSettings::requestConfirmation()
{
QMessageBox msg{QMessageBox::Question, tr("Brightness settings changed")
, tr("Confirmation required. Are the settings correct?")
, QMessageBox::Yes | QMessageBox::No};
int timeout = 5; // seconds
QString no_text = msg.button(QMessageBox::No)->text();
no_text += QStringLiteral("(%1)");
msg.setButtonText(QMessageBox::No, no_text.arg(timeout));
msg.setDefaultButton(QMessageBox::No);
QTimer timeoutTimer;
timeoutTimer.setSingleShot(false);
timeoutTimer.setInterval(1000);
connect(&timeoutTimer, &QTimer::timeout, [&] {
msg.setButtonText(QMessageBox::No, no_text.arg(--timeout));
if (timeout == 0)
{
timeoutTimer.stop();
msg.reject();
}
});
timeoutTimer.start();
if (QMessageBox::Yes == msg.exec())
{
// re-read current values
mMonitors = mBrightness->getMonitorsInfo();
} else
{
// revert the changes
mBrightness->setMonitorsSettings(mMonitors);
for (const auto & monitor : mMonitors)
emit monitorReverted(monitor);
}
}

@ -20,6 +20,7 @@
#define __BRIGHTNESS_SETTINGS_H__ #define __BRIGHTNESS_SETTINGS_H__
#include <QDialog> #include <QDialog>
#include <QTimer>
#include "xrandrbrightness.h" #include "xrandrbrightness.h"
#include "ui_brightnesssettings.h" #include "ui_brightnesssettings.h"
@ -31,11 +32,17 @@ Q_OBJECT
public: public:
BrightnessSettings(QWidget *parent =0); BrightnessSettings(QWidget *parent =0);
signals:
void monitorReverted(const MonitorInfo & monitor);
public slots: public slots:
void monitorSettingsChanged(MonitorInfo monitor); void monitorSettingsChanged(MonitorInfo monitor);
void requestConfirmation();
private: private:
XRandrBrightness *mBrightness; XRandrBrightness *mBrightness;
QList<MonitorInfo> mMonitors;
QTimer mConfirmRequestTimer;
Ui::BrightnessSettings *ui; Ui::BrightnessSettings *ui;

@ -29,6 +29,16 @@
<item> <item>
<layout class="QVBoxLayout" name="layout"/> <layout class="QVBoxLayout" name="layout"/>
</item> </item>
<item>
<widget class="QCheckBox" name="confirmCB">
<property name="text">
<string>Require confirmation after settings change</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item> <item>
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation"> <property name="orientation">

@ -54,3 +54,15 @@ void OutputWidget::brightnessChanged(int value)
emit changed(mMonitor); emit changed(mMonitor);
} }
void OutputWidget::setRevertedValues(const MonitorInfo & monitor)
{
if (mMonitor.id() == monitor.id() && mMonitor.name() == monitor.name())
{
ui->backlightSlider->blockSignals(true);
ui->backlightSlider->setValue(monitor.backlight());
ui->backlightSlider->blockSignals(false);
ui->brightnessSlider->blockSignals(true);
ui->brightnessSlider->setValue(monitor.brightness()*100);
ui->brightnessSlider->blockSignals(false);
}
}

@ -35,6 +35,7 @@ signals:
public slots: public slots:
void backlightChanged(int value); void backlightChanged(int value);
void brightnessChanged(int value); void brightnessChanged(int value);
void setRevertedValues(const MonitorInfo & monitor);
private: private:
MonitorInfo mMonitor; MonitorInfo mMonitor;
Ui::OutputWidget *ui; Ui::OutputWidget *ui;

@ -0,0 +1,2 @@
# Translations
Name[ar]=إعدادات السّطوع

@ -0,0 +1,2 @@
# Translations
Name[ca]=Ajusts de la brillantor

@ -34,7 +34,6 @@
#include <QDateTime> #include <QDateTime>
#include <QFileInfo> #include <QFileInfo>
#include <XdgIcon>
#include <XdgDesktopFile> #include <XdgDesktopFile>
#include <XdgDirs> #include <XdgDirs>
#include <LXQt/Settings> #include <LXQt/Settings>

@ -0,0 +1,4 @@
# Translations
Name[ar]=ارتباطات الملفّات
GenericName[ar]=إعدادات ارتباطات الملفّات
Comment[ar]=اضبط التّطبيقات المرتبطة بأنواع الملفّات المعروفة

@ -0,0 +1,4 @@
# Translations
Name[ca]=Associacions dels fitxers
GenericName[ca]=Ajusts de les associacions dels fitxers
Comment[ca]=Configureu les aplicacions associades amb els tipus de fitxers coneguts

@ -0,0 +1,4 @@
# Translations
Name[ar]=لوحة المفاتيح والفأرة
GenericName[ar]=إعدادات الدّخل
Comment[ar]=اضبط لوحة المفاتيح، والفأرة وأجهزة الدّخل الأخرى

@ -0,0 +1,4 @@
# Translations
Name[ca]=Teclat i ratolí
GenericName[ca]=Ajusts de l'entrada
Comment[ca]=Configureu el teclat, el ratolí i altres dispositius d'entrada

@ -25,7 +25,6 @@
#include <LXQt/SingleApplication> #include <LXQt/SingleApplication>
#include <XdgIcon>
#include <LXQt/Settings> #include <LXQt/Settings>
#include <LXQt/ConfigDialog> #include <LXQt/ConfigDialog>
#include "localeconfig.h" #include "localeconfig.h"

@ -0,0 +1,3 @@
Name[ar]=المحليّة
GenericName[ar]=إعدادات المحليّة
Comment[ar]=إعدادات المحليّة للكسكيوت

@ -0,0 +1,3 @@
Name[ca]=Configuració regional
GenericName[ca]=Ajusts de la configuració regional
Comment[ca]=Ajusts de la configuració regional per a LXQt

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

@ -24,12 +24,10 @@
#include <KScreen/Config> #include <KScreen/Config>
#include <KScreen/GetConfigOperation> #include <KScreen/GetConfigOperation>
#include <KScreen/SetConfigOperation> #include <KScreen/SetConfigOperation>
#include <QJsonObject> #include <LXQt/Settings>
#include <QJsonArray>
#include <lxqtsettings.h>
#include <QJsonDocument>
#include <KScreen/EDID> #include <KScreen/EDID>
#include <QThread> #include <QThread>
#include <QCoreApplication>
LoadSettings::LoadSettings(QObject *parent):QObject(parent) LoadSettings::LoadSettings(QObject *parent):QObject(parent)
@ -55,8 +53,6 @@ void LoadSettings::loadConfiguration(KScreen::ConfigPtr config)
settings.endGroup(); settings.endGroup();
applySettings(config, monitors); applySettings(config, monitors);
exit(0);
} }
@ -76,10 +72,10 @@ void applySettings(KScreen::ConfigPtr config, QList<MonitorSettings> monitors)
if( monitor.hash != edid->hash() ) if( monitor.hash != edid->hash() )
{ {
qDebug() << "Hash: " << monitor.hash << "==" << edid->hash(); qDebug() << "Hash: " << monitor.hash << "==" << edid->hash();
return exit(1); // Saved settings are from other monitor return QCoreApplication::instance()->exit(1); // Saved settings are from other monitor
} }
if( monitor.connected != output->isConnected() ) if( monitor.connected != output->isConnected() )
return exit(2); // Saved settings are from other monitor return QCoreApplication::instance()->exit(2); // Saved settings are from other monitor
if( !output->isConnected() ) if( !output->isConnected() )
continue; continue;
output->setEnabled( monitor.enabled ); output->setEnabled( monitor.enabled );
@ -112,5 +108,7 @@ void applySettings(KScreen::ConfigPtr config, QList<MonitorSettings> monitors)
if (KScreen::Config::canBeApplied(config)) if (KScreen::Config::canBeApplied(config))
KScreen::SetConfigOperation(config).exec(); KScreen::SetConfigOperation(config).exec();
QCoreApplication::instance()->exit(0);
} }

@ -42,7 +42,7 @@ int main(int argc, char** argv)
if( loadSettingsOk(argc, argv) ) if( loadSettingsOk(argc, argv) )
{ {
// If -l option is provided, settings are loaded and app is closed. // If -l option is provided, settings are loaded and app is closed.
QCoreApplication app(argc, argv); QGuiApplication app(argc, argv);
LoadSettings load; LoadSettings load;
return app.exec(); return app.exec();
} }

@ -0,0 +1,3 @@
Name[ar]=إعدادات الشّاشة
GenericName[ar]=إعدادات الشّاشة
Comment[ar]=اضبط الشّاشات

@ -0,0 +1,4 @@
#Translations
Name[ca]=Ajusts del monitor
GenericName[ca]=Ajusts del monitor
Comment[ca]=Configureu els monitors

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 31 KiB

@ -175,7 +175,7 @@ public:
/* We let Qt calculate the real cell size but consider the 4-px margin /* We let Qt calculate the real cell size but consider the 4-px margin
around each cell and try to add a 2-px margin around the selection around each cell and try to add a 2-px margin around the selection
rectangle for styles that, unlike Fusion, highlight the whole item. */ rectangle for styles that, unlike Fusion, highlight the whole item. */
QStyleOptionViewItemV4 opt = option; QStyleOptionViewItem opt = option;
int delta = opt.rect.width() - (mView->gridSize().width() - 8); int delta = opt.rect.width() - (mView->gridSize().width() - 8);
if (delta > 0) if (delta > 0)
opt.rect.adjust(delta/2, 0 , -delta/2, 0); opt.rect.adjust(delta/2, 0 , -delta/2, 0);
@ -187,7 +187,7 @@ public:
protected: protected:
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
{ {
QStyleOptionViewItemV4 opt = option; QStyleOptionViewItem opt = option;
initStyleOption(&opt, index); initStyleOption(&opt, index);
const QSize & iconSize = option.decorationSize; const QSize & iconSize = option.decorationSize;

@ -131,9 +131,9 @@ bool QCategorizedView::Private::isCategorized() const
return proxyModel && categoryDrawer && proxyModel->isCategorizedModel(); return proxyModel && categoryDrawer && proxyModel->isCategorizedModel();
} }
QStyleOptionViewItemV4 QCategorizedView::Private::blockRect(const QModelIndex &representative) QStyleOptionViewItem QCategorizedView::Private::blockRect(const QModelIndex &representative)
{ {
QStyleOptionViewItemV4 option(q->viewOptions()); QStyleOptionViewItem option(q->viewOptions());
const int height = categoryDrawer->categoryHeight(representative, option); const int height = categoryDrawer->categoryHeight(representative, option);
const QString categoryDisplay = representative.data(QCategorizedSortFilterProxyModel::CategoryDisplayRole).toString(); const QString categoryDisplay = representative.data(QCategorizedSortFilterProxyModel::CategoryDisplayRole).toString();
QPoint pos = blockPosition(categoryDisplay); QPoint pos = blockPosition(categoryDisplay);
@ -805,9 +805,9 @@ void QCategorizedView::paintEvent(QPaintEvent *event)
while (it != d->blocks.constEnd()) { while (it != d->blocks.constEnd()) {
const Private::Block &block = *it; const Private::Block &block = *it;
const QModelIndex categoryIndex = d->proxyModel->index(block.firstIndex.row(), d->proxyModel->sortColumn(), rootIndex()); const QModelIndex categoryIndex = d->proxyModel->index(block.firstIndex.row(), d->proxyModel->sortColumn(), rootIndex());
QStyleOptionViewItemV4 option(viewOptions()); QStyleOptionViewItem option(viewOptions());
option.features |= d->alternatingBlockColors && block.alternate ? QStyleOptionViewItemV4::Alternate option.features |= d->alternatingBlockColors && block.alternate ? QStyleOptionViewItem::Alternate
: QStyleOptionViewItemV4::None; : QStyleOptionViewItem::None;
option.state |= !d->collapsibleBlocks || !block.collapsed ? QStyle::State_Open option.state |= !d->collapsibleBlocks || !block.collapsed ? QStyle::State_Open
: QStyle::State_None; : QStyle::State_None;
const int height = d->categoryDrawer->categoryHeight(categoryIndex, option); const int height = d->categoryDrawer->categoryHeight(categoryIndex, option);
@ -854,13 +854,13 @@ void QCategorizedView::paintEvent(QPaintEvent *event)
const QModelIndex index = d->proxyModel->index(i, modelColumn(), rootIndex()); const QModelIndex index = d->proxyModel->index(i, modelColumn(), rootIndex());
const Qt::ItemFlags flags = d->proxyModel->flags(index); const Qt::ItemFlags flags = d->proxyModel->flags(index);
QStyleOptionViewItemV4 option(viewOptions()); QStyleOptionViewItem option(viewOptions());
option.rect = visualRect(index); option.rect = visualRect(index);
option.widget = this; option.widget = this;
option.features |= wordWrap() ? QStyleOptionViewItemV2::WrapText option.features |= wordWrap() ? QStyleOptionViewItem::WrapText
: QStyleOptionViewItemV2::None; : QStyleOptionViewItem::None;
option.features |= alternatingRowColors() && alternateItem ? QStyleOptionViewItemV4::Alternate option.features |= alternatingRowColors() && alternateItem ? QStyleOptionViewItem::Alternate
: QStyleOptionViewItemV4::None; : QStyleOptionViewItem::None;
if (flags & Qt::ItemIsSelectable) { if (flags & Qt::ItemIsSelectable) {
option.state |= selectionModel()->isSelected(index) ? QStyle::State_Selected option.state |= selectionModel()->isSelected(index) ? QStyle::State_Selected
: QStyle::State_None; : QStyle::State_None;
@ -967,7 +967,7 @@ void QCategorizedView::mouseMoveEvent(QMouseEvent *event)
while (it != d->blocks.constEnd()) { while (it != d->blocks.constEnd()) {
const Private::Block &block = *it; const Private::Block &block = *it;
const QModelIndex categoryIndex = d->proxyModel->index(block.firstIndex.row(), d->proxyModel->sortColumn(), rootIndex()); const QModelIndex categoryIndex = d->proxyModel->index(block.firstIndex.row(), d->proxyModel->sortColumn(), rootIndex());
QStyleOptionViewItemV4 option(viewOptions()); QStyleOptionViewItem option(viewOptions());
const int height = d->categoryDrawer->categoryHeight(categoryIndex, option); const int height = d->categoryDrawer->categoryHeight(categoryIndex, option);
QPoint pos = d->blockPosition(it.key()); QPoint pos = d->blockPosition(it.key());
pos.ry() -= height; pos.ry() -= height;
@ -979,7 +979,7 @@ void QCategorizedView::mouseMoveEvent(QMouseEvent *event)
if (option.rect.contains(mousePos)) { if (option.rect.contains(mousePos)) {
if (d->categoryDrawerV3 && d->hoveredBlock->height != -1 && *d->hoveredBlock != block) { if (d->categoryDrawerV3 && d->hoveredBlock->height != -1 && *d->hoveredBlock != block) {
const QModelIndex categoryIndex = d->proxyModel->index(d->hoveredBlock->firstIndex.row(), d->proxyModel->sortColumn(), rootIndex()); const QModelIndex categoryIndex = d->proxyModel->index(d->hoveredBlock->firstIndex.row(), d->proxyModel->sortColumn(), rootIndex());
const QStyleOptionViewItemV4 option = d->blockRect(categoryIndex); const QStyleOptionViewItem option = d->blockRect(categoryIndex);
d->categoryDrawerV3->mouseLeft(categoryIndex, option.rect); d->categoryDrawerV3->mouseLeft(categoryIndex, option.rect);
*d->hoveredBlock = block; *d->hoveredBlock = block;
d->hoveredCategory = it.key(); d->hoveredCategory = it.key();
@ -999,7 +999,7 @@ void QCategorizedView::mouseMoveEvent(QMouseEvent *event)
} }
if (d->categoryDrawerV3 && d->hoveredBlock->height != -1) { if (d->categoryDrawerV3 && d->hoveredBlock->height != -1) {
const QModelIndex categoryIndex = d->proxyModel->index(d->hoveredBlock->firstIndex.row(), d->proxyModel->sortColumn(), rootIndex()); const QModelIndex categoryIndex = d->proxyModel->index(d->hoveredBlock->firstIndex.row(), d->proxyModel->sortColumn(), rootIndex());
const QStyleOptionViewItemV4 option = d->blockRect(categoryIndex); const QStyleOptionViewItem option = d->blockRect(categoryIndex);
d->categoryDrawerV3->mouseLeft(categoryIndex, option.rect); d->categoryDrawerV3->mouseLeft(categoryIndex, option.rect);
*d->hoveredBlock = Private::Block(); *d->hoveredBlock = Private::Block();
d->hoveredCategory = QString(); d->hoveredCategory = QString();
@ -1022,7 +1022,7 @@ void QCategorizedView::mousePressEvent(QMouseEvent *event)
while (it != d->blocks.constEnd()) { while (it != d->blocks.constEnd()) {
const Private::Block &block = *it; const Private::Block &block = *it;
const QModelIndex categoryIndex = d->proxyModel->index(block.firstIndex.row(), d->proxyModel->sortColumn(), rootIndex()); const QModelIndex categoryIndex = d->proxyModel->index(block.firstIndex.row(), d->proxyModel->sortColumn(), rootIndex());
const QStyleOptionViewItemV4 option = d->blockRect(categoryIndex); const QStyleOptionViewItem option = d->blockRect(categoryIndex);
const QPoint mousePos = viewport()->mapFromGlobal(QCursor::pos()); const QPoint mousePos = viewport()->mapFromGlobal(QCursor::pos());
if (option.rect.contains(mousePos)) { if (option.rect.contains(mousePos)) {
if (d->categoryDrawerV3) { if (d->categoryDrawerV3) {
@ -1053,7 +1053,7 @@ void QCategorizedView::mouseReleaseEvent(QMouseEvent *event)
while (it != d->blocks.constEnd()) { while (it != d->blocks.constEnd()) {
const Private::Block &block = *it; const Private::Block &block = *it;
const QModelIndex categoryIndex = d->proxyModel->index(block.firstIndex.row(), d->proxyModel->sortColumn(), rootIndex()); const QModelIndex categoryIndex = d->proxyModel->index(block.firstIndex.row(), d->proxyModel->sortColumn(), rootIndex());
const QStyleOptionViewItemV4 option = d->blockRect(categoryIndex); const QStyleOptionViewItem option = d->blockRect(categoryIndex);
const QPoint mousePos = viewport()->mapFromGlobal(QCursor::pos()); const QPoint mousePos = viewport()->mapFromGlobal(QCursor::pos());
if (option.rect.contains(mousePos)) { if (option.rect.contains(mousePos)) {
if (d->categoryDrawerV3) { if (d->categoryDrawerV3) {
@ -1081,7 +1081,7 @@ void QCategorizedView::leaveEvent(QEvent *event)
} }
if (d->categoryDrawerV3 && d->hoveredBlock->height != -1) { if (d->categoryDrawerV3 && d->hoveredBlock->height != -1) {
const QModelIndex categoryIndex = d->proxyModel->index(d->hoveredBlock->firstIndex.row(), d->proxyModel->sortColumn(), rootIndex()); const QModelIndex categoryIndex = d->proxyModel->index(d->hoveredBlock->firstIndex.row(), d->proxyModel->sortColumn(), rootIndex());
const QStyleOptionViewItemV4 option = d->blockRect(categoryIndex); const QStyleOptionViewItem option = d->blockRect(categoryIndex);
d->categoryDrawerV3->mouseLeft(categoryIndex, option.rect); d->categoryDrawerV3->mouseLeft(categoryIndex, option.rect);
*d->hoveredBlock = Private::Block(); *d->hoveredBlock = Private::Block();
d->hoveredCategory = QString(); d->hoveredCategory = QString();

@ -47,7 +47,7 @@ public:
/** /**
* @return the block rect for the representative @p representative. * @return the block rect for the representative @p representative.
*/ */
QStyleOptionViewItemV4 blockRect(const QModelIndex &representative); QStyleOptionViewItem blockRect(const QModelIndex &representative);
/** /**
* Returns the first and last element that intersects with rect. * Returns the first and last element that intersects with rect.

@ -1,4 +1,4 @@
# Translations # Translations
Comment[ar]=تهيئة أقسام ريزر كيوت Comment[ar]=اضبط نظامك
GenericName[ar]=تهيئة ريزر GenericName[ar]=إعدادات النّظام
Name[ar]=مركز تهيئة ريزر Name[ar]=مركز لكسكيوت للضّبط

@ -0,0 +1,4 @@
# Translations
Name[ca]=Centre de configuració de LXQt
GenericName[ca]=Ajusts del sistema
Comment[ca]=Configureu el vostre sistema
Loading…
Cancel
Save