diff --git a/Widgets/NPanel.qml b/Widgets/NPanel.qml index 02f28860..794711c0 100644 --- a/Widgets/NPanel.qml +++ b/Widgets/NPanel.qml @@ -211,7 +211,10 @@ Loader { NShapedRectangle { id: panelBackground - backgroundColor: (attachedToBar && Settings.data.bar.backgroundOpacity > 0 && (topLeftInverted || topRightInverted || bottomLeftInverted || bottomRightInverted)) ? Qt.alpha(panelBackgroundColor, Settings.data.bar.backgroundOpacity) : panelBackgroundColor + property real opacityThreshold: 0.33 + + + backgroundColor: (attachedToBar && Settings.data.bar.backgroundOpacity > opacityThreshold && (topLeftInverted || topRightInverted || bottomLeftInverted || bottomRightInverted)) ? Qt.alpha(panelBackgroundColor, Settings.data.bar.backgroundOpacity) : panelBackgroundColor topLeftRadius: Style.radiusL topRightRadius: Style.radiusL @@ -222,7 +225,7 @@ Loader { // Top-left corner topLeftInverted: { - if (!attachedToBar || Settings.data.bar.backgroundOpacity <= 0) + if (!attachedToBar || Settings.data.bar.backgroundOpacity <= opacityThreshold) return false // Inverted if panel is anchored to top edge (bar is at top) @@ -237,7 +240,7 @@ Loader { // Top-right corner topRightInverted: { - if (!attachedToBar || Settings.data.bar.backgroundOpacity <= 0) + if (!attachedToBar || Settings.data.bar.backgroundOpacity <= opacityThreshold) return false // Inverted if panel is anchored to top edge (bar is at top) @@ -252,7 +255,7 @@ Loader { // Bottom-left corner bottomLeftInverted: { - if (!attachedToBar || Settings.data.bar.backgroundOpacity <= 0) + if (!attachedToBar || Settings.data.bar.backgroundOpacity <= opacityThreshold) return false // Inverted if panel is anchored to bottom edge (bar is at bottom) @@ -267,7 +270,7 @@ Loader { // Bottom-right corner bottomRightInverted: { - if (!attachedToBar || Settings.data.bar.backgroundOpacity <= 0) + if (!attachedToBar || Settings.data.bar.backgroundOpacity <= opacityThreshold) return false // Inverted if panel is anchored to bottom edge (bar is at bottom)