D28152: KWinRules KCM Redesign
David Edmundson
noreply at phabricator.kde.org
Sun Apr 19 00:22:44 BST 2020
davidedmundson added inline comments.
INLINE COMMENTS
> ngraham wrote in RulesEditor.qml:148
> due to a Qt bug, left and right margins are not reversed in RTL mode. So whenever you set one of those, yo need to explicitly handle the RTL case like this:
>
> Layout.leftMargin: !LayoutMirroring.enabled? Kirigami.Units.smallSpacing : 0
> Layout.rightMargin: LayoutMirroring.enabled? Kirigami.Units.smallSpacing : 0
>
> (same for all other instances of using left and right margins on an item in a layout)
We shouldn't be working round Qt bugs.
Also..if you do that, what will happen when Qt does fix it?
> ngraham wrote in RulesEditor.qml:194
> This doesn't do what you think it does.
>
> `searchField.focus` doesn't mean, "focus the search field", it means "allow the search field to *become* focused. The property is terribly mis-named. :(
>
> You probably want to set `focus: true` on the search field itself, and do `searchField.forceActiveFocus()` here.
>
> Then again I would imagine that the search field internally has `focus: true` set so setting it again here may be unnecessary.
> searchField.focus doesn't mean, "focus the search field", it means "allow the search field to *become* focused. The property is terribly mis-named. :(
That's not right.
focus does mean "become focussed".
However, it means "become focussed within the parent focus scope".
Focus Scopes are a super simple concept that are simultaneously very very very confusing, to the point that I can't explain them well.
In this case ListView is our focus scope, so we also need to make the listview focussed in order for it to have any effect.
forceActiveFocus() iterates through the tree doing that.
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D28152
To: iasensio, #plasma, #kwin, #vdg
Cc: ngraham, davidedmundson, hchain, broulik, zzag, kwin, dmenig, manueljlin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, konkinartem, ian, jguidon, Ghost6, jraleigh, zachus, fbampaloukas, squeakypancakes, alexde, IohannesPetros, GB_2, mkulinski, trickyricky26, ragreen, jackyalcine, iodelay, crozbo, ndavis, bwowk, ZrenBot, firef, alexeymin, skadinna, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, aaronhoneycutt, abetts, sebas, apol, ahiemstra, mbohlender, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200418/7e4abbea/attachment.html>
More information about the kwin
mailing list