From eb2fe693020f8767ecc22a1508701506a4eb9f4f Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Fri, 4 Feb 2022 07:29:16 +0300 Subject: [PATCH] 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 --- applets/systemtray/package/contents/ui/main.qml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/applets/systemtray/package/contents/ui/main.qml b/applets/systemtray/package/contents/ui/main.qml index 08fa26ca0..e437a871e 100644 --- a/applets/systemtray/package/contents/ui/main.qml +++ b/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