fix: window mask regions during overshoot
The window mask regions followed the panel positions exactly, so when they overshoot due to the open anim there will be a gap at the top.
This commit is contained in:
parent
0075d64ca2
commit
e8ffd51442
2 changed files with 84 additions and 24 deletions
|
|
@ -58,14 +58,10 @@ Variants {
|
|||
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
||||
WlrLayershell.keyboardFocus: visibilities.launcher || visibilities.session || panels.dashboard.needsKeyboard ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
||||
|
||||
mask: Region {
|
||||
x: bar.clampedWidth + win.dragMaskPadding
|
||||
y: Config.border.clampedThickness + win.dragMaskPadding
|
||||
width: win.width - bar.clampedWidth - Config.border.clampedThickness - win.dragMaskPadding * 2
|
||||
height: win.height - Config.border.clampedThickness * 2 - win.dragMaskPadding * 2
|
||||
intersection: Intersection.Xor
|
||||
|
||||
regions: regions.instances // qmllint disable stale-property-read
|
||||
mask: Regions {
|
||||
bar: bar
|
||||
panels: panels
|
||||
win: win
|
||||
}
|
||||
|
||||
anchors.top: true
|
||||
|
|
@ -73,22 +69,6 @@ Variants {
|
|||
anchors.left: true
|
||||
anchors.right: true
|
||||
|
||||
Variants {
|
||||
id: regions
|
||||
|
||||
model: panels.children
|
||||
|
||||
Region {
|
||||
required property Item modelData
|
||||
|
||||
x: modelData.x + bar.implicitWidth
|
||||
y: modelData.y + Config.border.thickness
|
||||
width: modelData.width
|
||||
height: modelData.height
|
||||
intersection: Intersection.Subtract
|
||||
}
|
||||
}
|
||||
|
||||
HyprlandFocusGrab {
|
||||
id: focusGrab
|
||||
|
||||
|
|
|
|||
80
modules/drawers/Regions.qml
Normal file
80
modules/drawers/Regions.qml
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs.config
|
||||
import qs.modules.bar as Bar
|
||||
|
||||
Region {
|
||||
id: root
|
||||
|
||||
required property Bar.BarWrapper bar
|
||||
required property Panels panels
|
||||
required property var win
|
||||
|
||||
x: bar.clampedWidth + win.dragMaskPadding
|
||||
y: Config.border.clampedThickness + win.dragMaskPadding
|
||||
width: win.width - bar.clampedWidth - Config.border.clampedThickness - win.dragMaskPadding * 2
|
||||
height: win.height - Config.border.clampedThickness * 2 - win.dragMaskPadding * 2
|
||||
intersection: Intersection.Xor
|
||||
|
||||
R {
|
||||
panel: root.panels.dashboard
|
||||
y: 0
|
||||
height: panel.height * (1 - root.panels.dashboard.offsetScale) + Config.border.thickness
|
||||
}
|
||||
|
||||
R {
|
||||
panel: root.panels.launcher
|
||||
y: root.win.height - height
|
||||
height: panel.height * (1 - root.panels.launcher.offsetScale) + Config.border.thickness
|
||||
}
|
||||
|
||||
R {
|
||||
id: sessionRegion
|
||||
|
||||
panel: root.panels.sessionWrapper
|
||||
x: root.win.width - width
|
||||
width: panel.width * (1 - root.panels.session.offsetScale) + Config.border.thickness + sidebarRegion.width
|
||||
}
|
||||
|
||||
R {
|
||||
id: sidebarRegion
|
||||
|
||||
panel: root.panels.sidebar
|
||||
x: root.win.width - width
|
||||
width: panel.width * (1 - root.panels.sidebar.offsetScale) + Config.border.thickness
|
||||
}
|
||||
|
||||
R {
|
||||
panel: root.panels.osdWrapper
|
||||
x: root.win.width - width
|
||||
width: panel.width * (1 - root.panels.osd.offsetScale) + Config.border.thickness + sessionRegion.width
|
||||
}
|
||||
|
||||
R {
|
||||
panel: root.panels.notifications
|
||||
y: 0
|
||||
height: panel.height + Config.border.thickness
|
||||
}
|
||||
|
||||
R {
|
||||
panel: root.panels.utilities
|
||||
y: root.win.height - height
|
||||
height: panel.height * (1 - root.panels.utilities.offsetScale) + Config.border.thickness
|
||||
}
|
||||
|
||||
R {
|
||||
panel: root.panels.popouts
|
||||
}
|
||||
|
||||
component R: Region {
|
||||
required property Item panel
|
||||
|
||||
x: panel.x + root.bar.implicitWidth
|
||||
y: panel.y + Config.border.thickness
|
||||
width: panel.width
|
||||
height: panel.height
|
||||
intersection: Intersection.Subtract
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue