From 3bd9444e2f17ad3269d39ce289b921a105d5d2fb Mon Sep 17 00:00:00 2001 From: zach Date: Tue, 19 May 2026 07:09:39 +0200 Subject: [PATCH] fix settings background desync --- Drawers/Panels.qml | 23 +++++++++--- Drawers/Windows.qml | 2 + Modules/Settings/Wrapper.qml | 71 +++++++++++++++++++++--------------- 3 files changed, 60 insertions(+), 36 deletions(-) diff --git a/Drawers/Panels.qml b/Drawers/Panels.qml index 8902ccf..5c84747 100644 --- a/Drawers/Panels.qml +++ b/Drawers/Panels.qml @@ -34,6 +34,7 @@ Item { readonly property alias resourcesWrapper: resourcesWrapper required property ShellScreen screen readonly property alias settings: settings + readonly property alias settingsWrapper: settingsWrapper readonly property alias sidebar: sidebar readonly property alias toasts: toasts readonly property alias utilities: utilities @@ -176,15 +177,25 @@ Item { visibilities: root.visibilities } - Settings.Wrapper { - id: settings + Item { + id: settingsWrapper anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top - // anchors.centerIn: parent - panels: root - screen: root.screen - visibilities: root.visibilities + clip: true + implicitHeight: settings.implicitHeight * (1 - settings.offsetScale) + implicitWidth: settings.implicitWidth + + Settings.Wrapper { + id: settings + + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.top + // anchors.centerIn: parent + panels: root + screen: root.screen + visibilities: root.visibilities + } } Dock.Wrapper { diff --git a/Drawers/Windows.qml b/Drawers/Windows.qml index 957b21f..464ccbb 100644 --- a/Drawers/Windows.qml +++ b/Drawers/Windows.qml @@ -272,6 +272,8 @@ Variants { radius: Appearance.rounding.large topLeftRadius: Appearance.rounding.large + Appearance.padding.smaller topRightRadius: Appearance.rounding.large + Appearance.padding.smaller + x: panels.settingsWrapper.x + panels.settings.x + Config.barConfig.border + y: panels.settingsWrapper.y + panels.settings.y + bar.implicitHeight } PanelBg { diff --git a/Modules/Settings/Wrapper.qml b/Modules/Settings/Wrapper.qml index dbcd141..77427bc 100644 --- a/Modules/Settings/Wrapper.qml +++ b/Modules/Settings/Wrapper.qml @@ -7,45 +7,56 @@ import qs.Helpers Item { id: root + property real offsetScale: shouldBeActive ? 0 : 1 required property var panels required property ShellScreen screen + readonly property bool shouldBeActive: visibilities.settings required property PersistentProperties visibilities - implicitHeight: 0 + anchors.topMargin: (-implicitHeight - 5) * offsetScale + implicitHeight: content.implicitHeight implicitWidth: content.implicitWidth - visible: height > 0 + opacity: 1 - offsetScale + visible: offsetScale < 1 - states: State { - name: "visible" - when: root.visibilities.settings - - PropertyChanges { - root.implicitHeight: content.implicitHeight + Behavior on offsetScale { + Anim { + duration: Appearance.anim.durations.expressiveDefaultSpatial + easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial } } - transitions: [ - Transition { - from: "" - to: "visible" - Anim { - duration: MaterialEasing.expressiveEffectsTime - easing.bezierCurve: MaterialEasing.expressiveEffects - property: "implicitHeight" - target: root - } - }, - Transition { - from: "visible" - to: "" - - Anim { - easing.bezierCurve: MaterialEasing.expressiveEffects - property: "implicitHeight" - target: root - } - } - ] + // states: State { + // name: "visible" + // when: root.visibilities.settings + // + // PropertyChanges { + // root.implicitHeight: content.implicitHeight + // } + // } + // transitions: [ + // Transition { + // from: "" + // to: "visible" + // + // Anim { + // duration: MaterialEasing.expressiveEffectsTime + // easing.bezierCurve: MaterialEasing.expressiveEffects + // property: "implicitHeight" + // target: root + // } + // }, + // Transition { + // from: "visible" + // to: "" + // + // Anim { + // easing.bezierCurve: MaterialEasing.expressiveEffects + // property: "implicitHeight" + // target: root + // } + // } + // ] CustomClippingRect { anchors.fill: parent