From 713302c045359fe8bf9a111303cbe1331e14a69c Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Wed, 6 May 2026 20:07:53 +1000 Subject: [PATCH] fix: notif popups not dodging utils panel Also make dodging merge with osd/session --- modules/drawers/Panels.qml | 1 + modules/notifications/Content.qml | 12 ++++++++++-- modules/notifications/Wrapper.qml | 1 + modules/utilities/Content.qml | 10 +++++++++- modules/utilities/Wrapper.qml | 1 + modules/utilities/cards/IdleInhibit.qml | 4 +++- modules/utilities/cards/Record.qml | 4 +++- 7 files changed, 28 insertions(+), 5 deletions(-) diff --git a/modules/drawers/Panels.qml b/modules/drawers/Panels.qml index d8948deb..eaeb4538 100644 --- a/modules/drawers/Panels.qml +++ b/modules/drawers/Panels.qml @@ -68,6 +68,7 @@ Item { sidebarPanel: sidebar osdPanel: osdWrapper sessionPanel: sessionWrapper + utilitiesPanel: utilities anchors.top: parent.top anchors.right: parent.right diff --git a/modules/notifications/Content.qml b/modules/notifications/Content.qml index 06a1f671..68ca5271 100644 --- a/modules/notifications/Content.qml +++ b/modules/notifications/Content.qml @@ -6,6 +6,7 @@ import qs.components import qs.components.containers import qs.components.widgets import qs.services +import qs.modules.utilities as Utilities Item { id: root @@ -13,6 +14,7 @@ Item { required property DrawerVisibilities visibilities required property Item osdPanel required property Item sessionPanel + required property Item utilitiesPanel readonly property int padding: Tokens.padding.large anchors.top: parent.top @@ -30,13 +32,19 @@ Item { height += (list.itemAtIndex(i) as NotifWrapper)?.nonAnimHeight ?? 0; if (visibilities.osd) { - const h = osdPanel.y - Config.border.rounding * 2 - padding * 2; + const h = osdPanel.y - padding; if (height > h) height = h; } if (visibilities.session) { - const h = sessionPanel.y - Config.border.rounding * 2 - padding * 2; + const h = sessionPanel.y - padding; + if (height > h) + height = h; + } + + if (visibilities.utilities) { + const h = ((QsWindow.window as QsWindow)?.screen.height ?? 0) - (utilitiesPanel as Utilities.Wrapper).nonAnimHeight - Config.border.thickness * 2 - padding * 2 - Tokens.spacing.extraLarge; if (height > h) height = h; } diff --git a/modules/notifications/Wrapper.qml b/modules/notifications/Wrapper.qml index 97417e9c..0a18e943 100644 --- a/modules/notifications/Wrapper.qml +++ b/modules/notifications/Wrapper.qml @@ -8,6 +8,7 @@ Item { required property Item sidebarPanel property alias osdPanel: content.osdPanel property alias sessionPanel: content.sessionPanel + property alias utilitiesPanel: content.utilitiesPanel visible: height > 0 anchors.topMargin: -5 diff --git a/modules/utilities/Content.qml b/modules/utilities/Content.qml index 5488e0a9..eadf0f8c 100644 --- a/modules/utilities/Content.qml +++ b/modules/utilities/Content.qml @@ -13,6 +13,8 @@ Item { required property BarPopouts.Wrapper popouts required property matrix4x4 deformMatrix + readonly property real nonAnimHeight: idleInhibit.nonAnimHeight + record.nonAnimHeight + toggles.implicitHeight + layout.spacing * 2 + implicitWidth: layout.implicitWidth implicitHeight: layout.implicitHeight @@ -22,15 +24,21 @@ Item { anchors.fill: parent spacing: Tokens.spacing.medium - IdleInhibit {} + IdleInhibit { + id: idleInhibit + } Record { + id: record + props: root.props visibilities: root.visibilities z: 1 } Toggles { + id: toggles + visibilities: root.visibilities popouts: root.popouts } diff --git a/modules/utilities/Wrapper.qml b/modules/utilities/Wrapper.qml index 4ad98670..2a9af11c 100644 --- a/modules/utilities/Wrapper.qml +++ b/modules/utilities/Wrapper.qml @@ -26,6 +26,7 @@ Item { } readonly property bool shouldBeActive: visibilities.sidebar || (visibilities.utilities && Config.utilities.enabled && !(visibilities.session && Config.session.enabled)) readonly property real totalPadding: content.anchors.margins + CUtils.clamp(content.anchors.margins - Config.border.thickness, 0, content.anchors.margins) + readonly property real nonAnimHeight: ((content.item as Content)?.nonAnimHeight ?? 0) + totalPadding property real offsetScale: shouldBeActive ? 0 : 1 property real sidebarLerp diff --git a/modules/utilities/cards/IdleInhibit.qml b/modules/utilities/cards/IdleInhibit.qml index 81f841bf..c5244c93 100644 --- a/modules/utilities/cards/IdleInhibit.qml +++ b/modules/utilities/cards/IdleInhibit.qml @@ -8,8 +8,10 @@ import qs.services StyledRect { id: root + readonly property real nonAnimHeight: layout.implicitHeight + (IdleInhibitor.enabled ? activeChip.implicitHeight + activeChip.anchors.topMargin : 0) + Tokens.padding.extraLargeIncreased + Layout.fillWidth: true - implicitHeight: layout.implicitHeight + (IdleInhibitor.enabled ? activeChip.implicitHeight + activeChip.anchors.topMargin : 0) + Tokens.padding.extraLargeIncreased + implicitHeight: nonAnimHeight radius: Tokens.rounding.large color: Colours.tPalette.m3surfaceContainer diff --git a/modules/utilities/cards/Record.qml b/modules/utilities/cards/Record.qml index 98ab4507..c0d7e0c6 100644 --- a/modules/utilities/cards/Record.qml +++ b/modules/utilities/cards/Record.qml @@ -12,6 +12,7 @@ StyledRect { required property var props required property DrawerVisibilities visibilities + readonly property real nonAnimHeight: btnLayout.implicitHeight + listOrControls.implicitHeight + layout.spacing + layout.anchors.margins * 2 Layout.fillWidth: true implicitHeight: layout.implicitHeight + layout.anchors.margins * 2 @@ -27,8 +28,9 @@ StyledRect { spacing: Tokens.spacing.medium RowLayout { + id: btnLayout + spacing: Tokens.spacing.medium - z: 1 StyledRect { implicitWidth: implicitHeight