Skip to content

Commit

Permalink
fix: temporary enable panel mask on geometry change to fix broken cli…
Browse files Browse the repository at this point in the history
…ckable area

This is a workaround while I figure out why this happens

refs: #100
  • Loading branch information
luisbocanegra committed Oct 22, 2024
1 parent 91f3fa3 commit 5b20412
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion package/contents/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -64,6 +64,7 @@ PlasmoidItem {
}

property var unifiedBackgroundTracker: []
property bool doPanelClickFix: false
property bool doPanelLengthFix: false

property var cfg: {
Expand Down Expand Up @@ -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()
}

Expand Down

0 comments on commit 5b20412

Please sign in to comment.