D19745: Fix system tray UI/UX & refactor

Kai Uwe Broulik noreply at phabricator.kde.org
Sat May 25 18:20:18 BST 2019


broulik added a comment.


  Mouse buttons aren't propagated to the applet anymore, e.g. middle click on volume icon to mute no longer works.

INLINE COMMENTS

> AbstractItem.qml:22
>  import QtQuick 2.1
> +import QtQuick.Layouts 1.12
>  import org.kde.plasma.core 2.0 as PlasmaCore

You sure this high version number is neccessary?

> AbstractItem.qml:30
>  
> -    height: effectiveItemSize + marginHints.top + marginHints.bottom
> -    width: labelVisible ? parent.width : effectiveItemSize + marginHints.left + marginHints.right
> +    Layout.fillHeight: !(labelVisible || vertical)
> +    Layout.fillWidth:    labelVisible || vertical

Avoid doing negated disjunctions for clarity: `!labelVisible && !vertical`

> AbstractItem.qml:74
> +            Layout.preferredWidth: abstractItem.effectiveItemSize
> +            Layout.preferredHeight: abstractItem.effectiveItemSize
> +            Layout.leftMargin: labelVisible ? marginHints.left : 0

For some reason the icons are now smaller than they were before, observed on two separate computers, they used to be the same as the panel icon here:
F6849506: Screenshot_20190525_191014.png <https://phabricator.kde.org/F6849506>

> AbstractItem.qml:76
> +            Layout.leftMargin: labelVisible ? marginHints.left : 0
> +            Layout.rightMargin: labelVisible ? marginHints.right : 0
> +            Layout.alignment: Qt.AlignVCenter | (labelVisible ? Qt.AlignLeft : Qt.AlignHCenter)

This margin stuff doesn't work with right to left layout.
Run `plasmashell -reverse` and observe that there's no left padding in the item anymore:
F6849504: Screenshot_20190525_190949.png <https://phabricator.kde.org/F6849504>

> AbstractItem.qml:130
> +            iconItem.parent = iconItemContainer;
> +            iconItem.anchors.fill = iconItemContainer;
> +        }

Can you just make the `iconItem` have a `anchors.fill: parent`?

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D19745

To: ratijastk, #vdg, #plasma, broulik, mart, hein, davidedmundson
Cc: aacid, davidre, davidedmundson, ngraham, ndavis, anthonyfieroni, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190525/8562073a/attachment-0001.html>


More information about the Plasma-devel mailing list