systray: Fix applet's appearance on a desktop

All the sizing and positioning code in this SvgItem relies on assumption
that plasmoid's location would we strictly either one of four edge
types. So this patch ensures that this thin separator line is only
visible when this assumption is true. Otherwise its both width and
height get reset (by binding `undefined`), and SVG starts filling up
the whole available area, which leads to a visual glitch that looks
like a as grayed out or faded applet.

See also: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/576

BUG: 449535
wilder-5.25
ivan tkachenko 4 years ago
parent 52cdb78e9f
commit eb2fe69302
No known key found for this signature in database
GPG Key ID: 4D197017E61437CF
  1. 3
      applets/systemtray/package/contents/ui/main.qml

@ -234,6 +234,9 @@ MouseArea {
// Draws a line between the applet dialog and the panel
PlasmaCore.SvgItem {
// Only draw for popups of panel applets, not desktop applets
visible: [PlasmaCore.Types.TopEdge, PlasmaCore.Types.LeftEdge, PlasmaCore.Types.RightEdge, PlasmaCore.Types.BottomEdge]
.includes(plasmoid.location)
anchors {
top: plasmoid.location == PlasmaCore.Types.BottomEdge ? undefined : parent.top
left: plasmoid.location == PlasmaCore.Types.RightEdge ? undefined : parent.left

Loading…
Cancel
Save