fix: notif popups not dodging utils panel
Also make dodging merge with osd/session
This commit is contained in:
parent
7c78781727
commit
713302c045
7 changed files with 28 additions and 5 deletions
|
|
@ -68,6 +68,7 @@ Item {
|
|||
sidebarPanel: sidebar
|
||||
osdPanel: osdWrapper
|
||||
sessionPanel: sessionWrapper
|
||||
utilitiesPanel: utilities
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue