D29764: [kcm/kwinrules] Fix size properties not being stored
Ismael Asensio
noreply at phabricator.kde.org
Thu May 14 23:01:59 BST 2020
iasensio created this revision.
iasensio added reviewers: ngraham, KWin, Plasma.
Herald added a project: KWin.
Herald added a subscriber: kwin.
iasensio requested review of this revision.
REVISION SUMMARY
Use `QSize`/`QPoint` to handle and store coordinate values (size and position)
Previously, the rules model stored the "coordinate" type properties as a
`QString` with format `x, y`.
This fails when setting the properties to the config schema, as it requires
a proper `QPoint` or `QSize` value, specially the latter which can't be
convert from such a string.
BUG: 421055
TEST PLAN
- Add a new rule and set its position and size properties
- Hitting apply stores the right values in `~\.config\kwinrulesrc`
- Close the kcm and reopen, the values are loaded
- Property detection still works for size and position
Please note that there is a pre-existing bug of some position/sizes not being
applied to the windows in some cases, when using `Apply Initially`.
Better try using the `Force` policy.
REPOSITORY
R108 KWin
BRANCH
fixrulescoord
REVISION DETAIL
https://phabricator.kde.org/D29764
AFFECTED FILES
kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml
kcmkwin/kwinrules/package/contents/ui/ValueEditor.qml
kcmkwin/kwinrules/ruleitem.cpp
kcmkwin/kwinrules/ruleitem.h
kcmkwin/kwinrules/rulesmodel.cpp
To: iasensio, ngraham, #kwin, #plasma
Cc: kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200514/cba2c5b4/attachment.htm>
More information about the kwin
mailing list