kcms/rules: Improvements on the RuleEditor page
This is a set of small usability and code improvements on the Window Rules KCM I came across while working on a feature change
I hope they are not too many to bunch them together in this single MR (but multiple commits). Each one is fairly simple on its own and highly independent so I favored easier testability, but I can be convinced otherwise.
kcms/rules: Increase the default dialog size
This KCM is usually called via the application menu, which uses kcmshell, so it doesn't benefit from the SystemSettings minimum size.
Slightly increse its height, so there is more space for properties in the list views, either to configure them or to add them, so it feels less cramped.
BEFORE | AFTER |
---|---|
kcms/rules: Reuse items on the property selection ListView
This makes scrolling the list view much more responsive as there is no need to create new delegates
BUG: 449275 FIXED-IN: 6.2
kcms/rules: Make the "Add Property" button non-toggleable
Changing the text and meaning of the button unexpectedly for a regular operation is not consistent with any other place, and disregarded by the HIG.
The sheet can be closed by tapping outside of it, or throught the close button in its titlebar, as usual elsewhere.
BEFORE | AFTER |
---|---|
kcms/rules: Add a placeholder for properties filter
The list to add properties can be empty because no entry matches the filter text or if all the properties have been already added.
Show a placeholder instead of leaving the view just empty
BEFORE | AFTER |
---|---|
kcms/rules: Some QML clean-ups
- Remove unnecessary bindings to enabled: Properties that are not enabled are not shown in the list anyway, and it fixes QML warnings:
RuleItemDelegate.qml:16:5: Unable to assign [undefined] to bool
RuleItemDelegate.qml:93:17: Unable to assign [undefined] to bool
- Remove unnecessary colorSet
- Port away from javascript
var
- Remove outdated comment