more fixes, clip wrappers for most popouts

This commit is contained in:
2026-04-21 19:29:41 +02:00
parent ac1d19acbb
commit c3f877c19e
3 changed files with 63 additions and 28 deletions
+33
View File
@@ -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,6 +43,15 @@ Item {
anchors.margins: Config.barConfig.border
anchors.topMargin: bar.implicitHeight
Item {
id: resourcesWrapper
anchors.left: parent.left
anchors.top: parent.top
clip: true
implicitHeight: resources.implicitHeight
implicitWidth: resources.implicitWidth
Resources.Wrapper {
id: resources
@@ -48,6 +59,7 @@ Item {
anchors.top: parent.top
visibilities: root.visibilities
}
}
Item {
id: osdWrapper
@@ -125,13 +137,34 @@ Item {
visibilities: root.visibilities
}
Item {
id: dashboardWrapper
property real offsetScale: dashboard.shouldBeActive ? 0 : 1
anchors.right: parent.right
anchors.top: parent.top
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 {
id: sidebar
+20 -9
View File
@@ -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
}
+4 -13
View File
@@ -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