Bar/Panels: Unified transparency for panels and bar!

This commit is contained in:
Lemmy
2025-12-14 10:49:15 -05:00
parent 04852ccdc1
commit 3785f3f236
22 changed files with 170 additions and 209 deletions
@@ -22,7 +22,7 @@ Item {
// Reference to MainScreen (for panel access)
required property var windowRoot
readonly property color panelBackgroundColor: Qt.alpha(Color.mSurface, Settings.data.ui.panelBackgroundOpacity)
readonly property color panelBackgroundColor: Color.mSurface
anchors.fill: parent
@@ -34,6 +34,9 @@ Item {
// This caches the Shape to a GPU texture, reducing GPU tessellation overhead
layer.enabled: true
// Apply opacity to all backgrounds
opacity: Settings.data.ui.panelBackgroundOpacity
// The unified Shape container
Shape {
id: backgroundsShape
@@ -55,7 +58,7 @@ Item {
bar: root.bar
shapeContainer: backgroundsShape
windowRoot: root.windowRoot
backgroundColor: Qt.alpha(Color.mSurface, Settings.data.bar.backgroundOpacity)
backgroundColor: Settings.data.bar.transparent ? Color.transparent : panelBackgroundColor
}
/**
+1 -1
View File
@@ -718,7 +718,7 @@ Item {
return Settings.data.ui.panelsAttachedToBar || root.forceAttachToBar;
}
readonly property bool allowAttachToBar: {
if (!(Settings.data.ui.panelsAttachedToBar || root.forceAttachToBar) || Settings.data.bar.backgroundOpacity < 1.0) {
if (!(Settings.data.ui.panelsAttachedToBar || root.forceAttachToBar) || Settings.data.bar.transparent) {
return false;
}