From c3f877c19ee34b0051f99588cf74512e4cd3711f Mon Sep 17 00:00:00 2001 From: zach Date: Tue, 21 Apr 2026 19:29:41 +0200 Subject: [PATCH] more fixes, clip wrappers for most popouts --- Drawers/Panels.qml | 45 ++++++++++++++++++++++++++++++----- Drawers/Windows.qml | 29 +++++++++++++++------- Modules/Dashboard/Wrapper.qml | 17 ++++--------- 3 files changed, 63 insertions(+), 28 deletions(-) diff --git a/Drawers/Panels.qml b/Drawers/Panels.qml index f496440..51044eb 100644 --- a/Drawers/Panels.qml +++ b/Drawers/Panels.qml @@ -20,6 +20,7 @@ Item { required property Item bar readonly property alias dashboard: dashboard + readonly property alias dashboardWrapper: dashboardWrapper readonly property alias dock: dock readonly property alias drawing: drawing required property Canvas drawingItem @@ -30,6 +31,7 @@ Item { readonly property alias popouts: popouts.content readonly property alias popoutsWrapper: popouts readonly property alias resources: resources + readonly property alias resourcesWrapper: resourcesWrapper required property ShellScreen screen readonly property alias settings: settings readonly property alias sidebar: sidebar @@ -41,12 +43,22 @@ Item { anchors.margins: Config.barConfig.border anchors.topMargin: bar.implicitHeight - Resources.Wrapper { - id: resources + Item { + id: resourcesWrapper anchors.left: parent.left anchors.top: parent.top - visibilities: root.visibilities + clip: true + implicitHeight: resources.implicitHeight + implicitWidth: resources.implicitWidth + + Resources.Wrapper { + id: resources + + anchors.left: parent.left + anchors.top: parent.top + visibilities: root.visibilities + } } Item { @@ -125,12 +137,33 @@ Item { visibilities: root.visibilities } - Dashboard.Wrapper { - id: dashboard + Item { + id: dashboardWrapper + + property real offsetScale: dashboard.shouldBeActive ? 0 : 1 anchors.right: parent.right anchors.top: parent.top - visibilities: root.visibilities + clip: true + implicitHeight: dashboard.implicitHeight * (1 - offsetScale) + implicitWidth: dashboard.implicitWidth + + Behavior on offsetScale { + Anim { + duration: Appearance.anim.durations.expressiveDefaultSpatial + easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial + } + } + + Dashboard.Wrapper { + id: dashboard + + anchors.right: parent.right + anchors.top: parent.top + anchors.topMargin: (-implicitHeight - 5) * offsetScale + offsetScale: dashboardWrapper.offsetScale + visibilities: root.visibilities + } } Sidebar.Wrapper { diff --git a/Drawers/Windows.qml b/Drawers/Windows.qml index 6556bdd..df7f49b 100644 --- a/Drawers/Windows.qml +++ b/Drawers/Windows.qml @@ -170,15 +170,19 @@ Variants { PanelBg { id: dashBg - deformAmount: 0.15 * Config.appearance.deform.scale + deformAmount: 0.08 * Config.appearance.deform.scale + implicitHeight: panels.dashboard.height + implicitWidth: panels.dashboard.width panel: panels.dashboard radius: Appearance.rounding.normal + x: panels.dashboardWrapper.x + panels.dashboard.x + Config.barConfig.border + y: panels.dashboardWrapper.y + panels.dashboard.y + bar.implicitHeight } PanelBg { id: launcherBg - deformAmount: 0.15 * Config.appearance.deform.scale + deformAmount: 0.08 * Config.appearance.deform.scale panel: panels.launcher radius: Appearance.rounding.smallest + 5 } @@ -187,7 +191,7 @@ Variants { id: sidebarBg bottomLeftRadius: 0 - deformAmount: 0.1 * Config.appearance.deform.scale + deformAmount: 0.08 * Config.appearance.deform.scale exclude: panels.sidebar.offsetScale > 0.08 ? [] : [utilsBg] implicitHeight: panel.height * (1 / rawDeformMatrix.m22) + 2 panel: panels.sidebar @@ -197,10 +201,12 @@ Variants { id: osdBg deformAmount: 0.1 * Config.appearance.deform.scale + implicitHeight: panels.osd.height implicitWidth: panels.osd.width - panel: panels.osdWrapper + panel: panels.osd radius: 20 x: panels.osdWrapper.x + panels.osd.x + Config.barConfig.border + y: panels.osdWrapper.y + panels.osd.y + bar.implicitHeight } PanelBg { @@ -225,9 +231,10 @@ Variants { deformAmount: panels.popouts.isDetached ? 0.05 * Config.appearance.deform.scale : panels.popouts.hasCurrent ? 0.15 * Config.appearance.deform.scale : 0.1 * Config.appearance.deform.scale implicitHeight: panels.popouts.height * (1 + extraHeight) - implicitWidth: panels.popoutsWrapper.width - panel: panels.popoutsWrapper + implicitWidth: panels.popouts.width + panel: panels.popouts radius: (panels.popouts.currentName.startsWith("audio") || panels.popouts.currentName.startsWith("updates")) ? Appearance.rounding.normal : Appearance.rounding.smallest + x: panels.popoutsWrapper.x + panels.popouts.x + Config.barConfig.border y: panels.popoutsWrapper.y + panels.popouts.y + bar.implicitHeight - panels.popouts.height * extraHeight Behavior on extraHeight { @@ -239,15 +246,19 @@ Variants { PanelBg { id: resourcesBg - deformAmount: 0.15 * Config.appearance.deform.scale + deformAmount: 0.08 * Config.appearance.deform.scale + implicitHeight: panels.resources.height + implicitWidth: panels.resources.width panel: panels.resources radius: Appearance.rounding.normal + x: panels.resourcesWrapper.x + panels.resources.x + Config.barConfig.border + y: panels.resourcesWrapper.y + panels.resources.y + bar.implicitHeight } PanelBg { id: settingsBg - deformAmount: 0.1 * Config.appearance.deform.scale + deformAmount: 0.08 * Config.appearance.deform.scale panel: panels.settings radius: Appearance.rounding.large topLeftRadius: Appearance.rounding.large + Appearance.padding.smaller @@ -257,7 +268,7 @@ Variants { PanelBg { id: dockBg - deformAmount: 0.15 * Config.appearance.deform.scale + deformAmount: 0.08 * Config.appearance.deform.scale panel: panels.dock radius: Appearance.rounding.normal } diff --git a/Modules/Dashboard/Wrapper.qml b/Modules/Dashboard/Wrapper.qml index 757eab9..ef4e998 100644 --- a/Modules/Dashboard/Wrapper.qml +++ b/Modules/Dashboard/Wrapper.qml @@ -15,32 +15,23 @@ Item { reloadableId: "dashboardState" } readonly property real nonAnimHeight: state === "visible" ? (content.item?.nonAnimHeight ?? 0) : 0 + required property real offsetScale + readonly property bool shouldBeActive: root.visibilities.dashboard && Config.dashboard.enabled required property PersistentProperties visibilities - readonly property bool shouldBeActive: root.visibilities.dashboard && Config.dashboard.enabled - property real offsetScale: shouldBeActive ? 0 : 1 - - visible: offsetScale < 1 - anchors.topMargin: (-implicitHeight - 5) * offsetScale implicitHeight: content.implicitHeight implicitWidth: content.implicitWidth || 854 // Hard coded fallback for first open opacity: 1 - offsetScale - Behavior on offsetScale { - Anim { - duration: Appearance.anim.durations.expressiveDefaultSpatial - easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial - } - } + // visible: offsetScale < 1 Loader { id: content + active: root.shouldBeActive || root.visible anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter - active: root.shouldBeActive || root.visible - sourceComponent: Content { state: root.dashState visibilities: root.visibilities