From 5b20412ca2dca07456e763aac622d154524602d9 Mon Sep 17 00:00:00 2001 From: Luis Bocanegra Date: Sun, 20 Oct 2024 20:07:21 -0600 Subject: [PATCH] fix: temporary enable panel mask on geometry change to fix broken clickable area This is a workaround while I figure out why this happens refs: https://github.com/luisbocanegra/plasma-panel-colorizer/issues/100 --- package/contents/ui/main.qml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml index 80d8c35..aa74fc2 100644 --- a/package/contents/ui/main.qml +++ b/package/contents/ui/main.qml @@ -31,7 +31,7 @@ PlasmoidItem { property bool hideWidget: plasmoid.configuration.hideWidget property bool fixedSidePaddingEnabled: isEnabled && panelSettings.padding.enabled property bool isEnabled: plasmoid.configuration.isEnabled - property bool nativePanelBackgroundEnabled: isEnabled ? cfg.nativePanelBackground.enabled : enabled + property bool nativePanelBackgroundEnabled: (isEnabled ? cfg.nativePanelBackground.enabled : enabled) || doPanelClickFix property real nativePanelBackgroundOpacity: isEnabled ? cfg.nativePanelBackground.opacity : 1.0 property var panelWidgets: [] property int panelWidgetsCount: panelWidgets?.length || 0 @@ -64,6 +64,7 @@ PlasmoidItem { } property var unifiedBackgroundTracker: [] + property bool doPanelClickFix: false property bool doPanelLengthFix: false property var cfg: { @@ -122,11 +123,23 @@ PlasmoidItem { recolorCountChanged() } + // HACK: temporary enable panel mask on geometry change + // to fix broken clickable area + // https://github.com/luisbocanegra/plasma-panel-colorizer/issues/100 + // maybe also related to https://bugs.kde.org/show_bug.cgi?id=489086 + + function runPanelClickFix() { + doPanelClickFix = true + doPanelClickFix = false + } + onPanelWidthChanged: { + runPanelClickFix() updateMasks() } onPanelHeightChanged: { + runPanelClickFix() updateMasks() }