This splits the enum IconView::Flow into two enums
- IconView::Layout { Rows, Columns }
- IconView::Alignment { Left, Right }
Note that Qt::Alignment is not used to emphasize the fact that
these two properties are orthogonal (layoutDirection() is used
e.g. to place the scrollbar at the correct side of the screen,
whereas IconView::Alignment is about the side of the screen
the user want their icons to stick to.
This patch greatly improves the readability of the IconView
layouting code, as well as the user-friendliness of the
applet's Display configuration page, with a distinct separation
of the two layout-related factors.
Corresponding context menu actions have been added. They update
the configuration dialog combos when selected if the dialog is
open at that moment.
CCBUG:306537
The configChanged() implementation could unnecessarily schedule a
reload due to a bug in a has-this-config-element-changed comparison,
which would result in icon position losses in scenarios such as
changing the wallpaper or the workspace theme, without having touched
any sorting-related options. Further, OK'ing the config dialog could
undo the unsorted state entered by moving an icon while the dialog
was open; this is now handled by updating the sorting mode combo box
in the dialog after the icon is dropped.
The later relies on a preceding fix in kde-workspace.git to make
Applet::isUserConfiguring() work for containments if Folder View is
used as desktop containment.
- move the title configuration UI to the Location page
- use one combobox + one lineedit
- use an enum instead of comparing strings
- clean up the code
BUG:313940
FIXED-IN:4.11
- int m_filterType -> ProxyModel::FilterType m_filterType
- ProxyModel::filterModeFromInt(int) -> static_cast<ProxyModel::FilterType>(int)
- int -> QVariant<ProxyModel::FilterType> in the config UI
- selectUnselectAll() -> two separate methods; eliminate sender() call
This also fixes filterChanged() and configAccepted() wrt this config key.
Use the actual filter mode value instead of the combobox index which is
error-prone in case the order of the items in the combobox changes.
BUG:317323
FIXED_IN:4.10.2
- int m_filterType -> ProxyModel::FilterType m_filterType
- ProxyModel::filterModeFromInt(int) -> static_cast<ProxyModel::FilterType>(int)
- int -> QVariant<ProxyModel::FilterType> in the config UI
- selectUnselectAll() -> two separate methods; eliminate sender() call
This also fixes filterChanged() and configAccepted() wrt this config key.
Use the actual filter mode value instead of the combobox index which is
error-prone in case the order of the items in the combobox changes.
BUG:317323
FIXED_IN:4.10.2