D28152: KWinRules KCM Redesign

Ismael Asensio noreply at phabricator.kde.org
Sun Apr 19 02:06:32 BST 2020


iasensio added inline comments.

INLINE COMMENTS

> ngraham wrote in OptionsComboBox.qml:68
> Is this necessary to manually assign? I thought `LayoutMirroring.enabled` got set automatically?

You're right, it works automatically now!
It didn't previously for me, so maybe something was fixed for Qt5.14

> iasensio wrote in RuleItemDelegate.qml:67
> This helps keeping the description sizes more constant between delegates, so it looks more like a real table.
> 
> Setting `Layout.fillWidth:true` on the `Label`produces this
> F8186870: Screenshot_20200320_233750.png <https://phabricator.kde.org/F8186870>

I reworked all the Layout hints to use `preferredWidth` instead of max/mins and it seems to work much better, including the `elided`label.

> RulesEditor.qml:175
> +                        opacity: 0.7
> +                        Layout.maximumWidth: propertyDelegate.width - itemNameLabel.implicitWidth - Kirigami.Units.gridUnit * 6
> +                        Layout.alignment: Qt.AlignVCenter

I'm not too proud of this, but it was required to avoid this overlapping
F8245978: suggestions_overlap.png <https://phabricator.kde.org/F8245978>

> ngraham wrote in RulesEditor.qml:42
> the list items are back to changing their background on hover, which isn't necessary

Having `hoverEnabled: false` does not allow to show the delete button on hover only.
The other option is to have it always visible, which is not as a bad as I though, and is indeed cleaner than having the background changing colors
F8245946: remove_visible.png <https://phabricator.kde.org/F8245946>

> davidedmundson wrote in RulesEditor.qml:148
> We shouldn't be working round Qt bugs.
> 
> Also..if you do that, what will happen when Qt does fix it?

As a kind of middle way, I set the two margins to the same value

> ngraham wrote in RulesEditor.qml:175
> Is there a reason to use `opacity` rather than `visible` here?

It is to preserve the space of the button in the Layout when hidden

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/20200419/f75b8078/attachment.html>


More information about the kwin mailing list