smart-panel: boolean to disable blur + SessionMenu modifications: disable fullscreen blur, change a few colors.

This commit is contained in:
Lemmy
2026-02-25 19:26:40 -05:00
parent 4e3c385d7e
commit 7dc28fbd1a
3 changed files with 25 additions and 36 deletions
+13 -31
View File
@@ -217,39 +217,21 @@ PanelWindow {
bottomRightCorner: barPlaceholder.bottomRightCornerState
}
// ── Framed bar: frame body (4 strips) + rounded hole subtraction ──
// The 4 strips cover the entire frame area including straight-edge inner
// corners. A nested Subtract region then removes the hole with correct
// frameRadius rounding, leaving the blur boundary exactly matching the
// visual frame shape.
// Top strip (covers full width above hole)
// ── Framed bar: full screen minus rounded hole ──
Region {
x: 0
y: 0
width: (barPlaceholder.isFramed && root.barShouldShow) ? root.width : 0
height: (barPlaceholder.isFramed && root.barShouldShow) ? backgroundBlur.frameHoleY : 0
}
// Bottom strip
Region {
x: 0
y: (barPlaceholder.isFramed && root.barShouldShow) ? backgroundBlur.frameHoleY2 : 0
width: (barPlaceholder.isFramed && root.barShouldShow) ? root.width : 0
height: (barPlaceholder.isFramed && root.barShouldShow) ? (root.height - backgroundBlur.frameHoleY2) : 0
}
// Left strip (only at hole height - top/bottom strips already cover those rows)
Region {
x: 0
y: (barPlaceholder.isFramed && root.barShouldShow) ? backgroundBlur.frameHoleY : 0
width: (barPlaceholder.isFramed && root.barShouldShow) ? backgroundBlur.frameHoleX : 0
height: (barPlaceholder.isFramed && root.barShouldShow) ? (backgroundBlur.frameHoleY2 - backgroundBlur.frameHoleY) : 0
}
// Right strip
Region {
x: (barPlaceholder.isFramed && root.barShouldShow) ? backgroundBlur.frameHoleX2 : 0
y: (barPlaceholder.isFramed && root.barShouldShow) ? backgroundBlur.frameHoleY : 0
width: (barPlaceholder.isFramed && root.barShouldShow) ? (root.width - backgroundBlur.frameHoleX2) : 0
height: (barPlaceholder.isFramed && root.barShouldShow) ? (backgroundBlur.frameHoleY2 - backgroundBlur.frameHoleY) : 0
height: (barPlaceholder.isFramed && root.barShouldShow) ? root.height : 0
Region {
intersection: Intersection.Subtract
x: backgroundBlur.frameHoleX
y: backgroundBlur.frameHoleY
width: backgroundBlur.frameHoleX2 - backgroundBlur.frameHoleX
height: backgroundBlur.frameHoleY2 - backgroundBlur.frameHoleY
radius: backgroundBlur.frameR
}
}
// ── Panel blur regions ──
@@ -572,7 +554,7 @@ PanelWindow {
// Panel background geometry (from the currently open panel on this screen)
readonly property var panelBg: {
var op = PanelService.openedPanel;
if (!op || op.screen !== root.screen)
if (!op || op.screen !== root.screen || op.blurEnabled === false)
return null;
var region = op.panelRegion;
return (region && region.visible) ? region.panelItem : null;
@@ -581,7 +563,7 @@ PanelWindow {
// Panel background geometry for the closing panel (may coexist with panelBg)
readonly property var closingPanelBg: {
var cp = PanelService.closingPanel;
if (!cp || cp.screen !== root.screen)
if (!cp || cp.screen !== root.screen || cp.blurEnabled === false)
return null;
var region = cp.panelRegion;
return (region && region.visible) ? region.panelItem : null;
+3
View File
@@ -75,6 +75,9 @@ Item {
property bool cachedShouldAnimateWidth: false
property bool cachedShouldAnimateHeight: false
// Whether blur should be applied behind this panel
property bool blurEnabled: true
// Close with escape key
property bool closeWithEscape: true
+9 -5
View File
@@ -18,6 +18,9 @@ SmartPanel {
readonly property bool largeButtonsStyle: Settings.data.sessionMenu.largeButtonsStyle || false
readonly property bool largeButtonsLayout: Settings.data.sessionMenu.largeButtonsLayout || "grid"
// Large buttons style is fullscreen — disable blur behind it
blurEnabled: !largeButtonsStyle
// Make panel background transparent for large buttons style
panelBackgroundColor: largeButtonsStyle ? "transparent" : Color.mSurface
@@ -567,7 +570,7 @@ SmartPanel {
}
}
// Timer text for large buttons style (above buttons) - positioned absolutely with background
// Timer text for large buttons style, positioned absolutely with background
Rectangle {
id: timerTextContainer
visible: largeButtonsStyle && timerActive
@@ -577,7 +580,7 @@ SmartPanel {
width: timerText.width + Style.margin2XL
height: timerText.height + Style.margin2L
radius: Style.radiusM
color: Qt.alpha(Color.mSurface, Settings.data.ui.panelBackgroundOpacity)
color: Color.mSurfaceVariant
border.color: Color.mOutline
border.width: Style.borderS
z: 1000
@@ -591,7 +594,7 @@ SmartPanel {
})
font.weight: Style.fontWeightBold
pointSize: Style.fontSizeL
color: Color.mOnSurface
color: Color.mOnSurfaceVariant
}
}
@@ -638,6 +641,7 @@ SmartPanel {
visible: !largeButtonsStyle
anchors.fill: parent
anchors.margins: Style.marginL
color: Color.mSurface
ColumnLayout {
anchors.fill: parent
@@ -838,7 +842,7 @@ SmartPanel {
width: labelText.implicitWidth + Style.margin2M
height: labelText.height + Style.margin2XS
radius: Math.min(Style.radiusM, height / 2)
color: (buttonRoot.isSelected || buttonRoot.effectiveHover) ? Color.mOnPrimary : Qt.alpha(Color.mSurfaceVariant, 0.5)
color: (buttonRoot.isSelected || buttonRoot.effectiveHover) ? Color.mOnPrimary : Color.mSurfaceVariant
border.width: Style.borderS
border.color: (buttonRoot.isSelected || buttonRoot.effectiveHover) ? Color.mOnPrimary : Color.mOutline
visible: Settings.data.sessionMenu.showKeybinds && (buttonRoot.keybind !== "") && !buttonRoot.pending
@@ -944,7 +948,7 @@ SmartPanel {
if (isSelected || effectiveHover) {
return Qt.alpha(Color.mPrimary, 1.0);
}
return Qt.alpha(Color.mSurfaceVariant, Settings.data.ui.panelBackgroundOpacity);
return Color.mSurface;
}
border.width: Style.borderS