SettingsWindow: add snap to bar toggle

This commit is contained in:
Ly-sec
2025-11-07 16:26:21 +01:00
parent f3a9e2fa98
commit d8294d1108
14 changed files with 66 additions and 7 deletions
+3 -2
View File
@@ -24,6 +24,7 @@ Item {
property color panelBackgroundColor: Color.mSurface
property color panelBorderColor: Color.mOutline
property var buttonItem: null
property bool forceAttachToBar: false
// Anchoring properties
property bool panelAnchorHorizontalCenter: false
@@ -546,9 +547,9 @@ Item {
anchors.fill: parent
// Screen-dependent attachment properties
readonly property bool couldAttach: Settings.data.ui.panelsAttachedToBar
readonly property bool couldAttach: Settings.data.ui.panelsAttachedToBar || root.forceAttachToBar
readonly property bool couldAttachToBar: {
if (!Settings.data.ui.panelsAttachedToBar || Settings.data.bar.backgroundOpacity < 1.0) {
if (!(Settings.data.ui.panelsAttachedToBar || root.forceAttachToBar) || Settings.data.bar.backgroundOpacity < 1.0) {
return false
}