chore: regions now manually set, moved to separate file
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs.Modules.Bar as Bar
|
||||
|
||||
Region {
|
||||
id: root
|
||||
|
||||
required property Bar.BarLoader bar
|
||||
readonly property real borderThickness: win.borderThickness
|
||||
readonly property alias menuPopoutRegion: menuPopoutRegion
|
||||
required property Panels panels
|
||||
required property var win
|
||||
|
||||
height: win.height - bar.implicitHeight - win.borderThickness - win.dragMaskPadding * 2
|
||||
intersection: Intersection.Xor
|
||||
width: win.width - win.borderThickness * 2 - win.dragMaskPadding * 2
|
||||
x: win.borderThickness + win.dragMaskPadding
|
||||
y: bar.implicitHeight + win.dragMaskPadding
|
||||
|
||||
R {
|
||||
panel: root.panels.dashboardWrapper
|
||||
}
|
||||
|
||||
R {
|
||||
panel: root.panels.launcher
|
||||
}
|
||||
|
||||
R {
|
||||
id: sidebarRegion
|
||||
|
||||
panel: root.panels.sidebar
|
||||
width: panel.width * (1 - root.panels.sidebar.offsetScale) + root.borderThickness
|
||||
x: root.win.width - width
|
||||
}
|
||||
|
||||
R {
|
||||
panel: root.panels.osdWrapper
|
||||
width: panel.width * (1 - root.panels.osd.offsetScale) + root.borderThickness
|
||||
x: root.win.width - width
|
||||
}
|
||||
|
||||
R {
|
||||
panel: root.panels.notifications
|
||||
}
|
||||
|
||||
R {
|
||||
height: panel.height * (1 - root.panels.utilities.offsetScale) + root.borderThickness
|
||||
panel: root.panels.utilities
|
||||
y: root.win.height - height
|
||||
}
|
||||
|
||||
R {
|
||||
panel: root.panels.popoutsWrapper
|
||||
}
|
||||
|
||||
R {
|
||||
panel: root.panels.resourcesWrapper
|
||||
}
|
||||
|
||||
R {
|
||||
panel: root.panels.settingsWrapper
|
||||
}
|
||||
|
||||
R {
|
||||
panel: root.panels.dock
|
||||
}
|
||||
|
||||
R {
|
||||
panel: root.panels.clipboard
|
||||
}
|
||||
|
||||
Region {
|
||||
id: menuPopoutRegion
|
||||
|
||||
intersection: Intersection.Subtract
|
||||
}
|
||||
|
||||
component R: Region {
|
||||
required property Item panel
|
||||
|
||||
height: panel.height
|
||||
intersection: Intersection.Subtract
|
||||
width: panel.width
|
||||
x: panel.x + root.borderThickness
|
||||
y: panel.y + root.bar.implicitHeight
|
||||
}
|
||||
}
|
||||
+14
-32
@@ -44,7 +44,7 @@ CustomWindow {
|
||||
readonly property bool hasFullscreenOnNormalWs: monitor?.activeWorkspace?.toplevels.values.some(t => t.lastIpcObject.fullscreen > 1) ?? false
|
||||
readonly property bool hasSpecialWorkspace: (monitor?.lastIpcObject.specialWorkspace?.name.length ?? 0) > 0
|
||||
readonly property alias interactionWrapper: interactions
|
||||
readonly property alias menuRegion: menuPopoutRegion
|
||||
readonly property alias menuRegion: regions.menuPopoutRegion
|
||||
readonly property HyprlandMonitor monitor: Hypr.monitorFor(screen)
|
||||
property var root: Quickshell.shellDir
|
||||
readonly property real sdfBorderOffset: 2 * fsTransitionProg
|
||||
@@ -56,7 +56,7 @@ CustomWindow {
|
||||
WlrLayershell.layer: (fsTransitionProg > 0 && Config.general.showOverFullscreen) || (hasSpecialWorkspace && hasFullscreenOnNormalWs) ? WlrLayer.Overlay : WlrLayer.Top
|
||||
color: "transparent"
|
||||
contentItem.focus: true
|
||||
mask: visibilities.isDrawing ? null : (hasFullscreen ? emptyRegion : region)
|
||||
mask: visibilities.isDrawing ? null : (hasFullscreen ? emptyRegion : regions)
|
||||
name: "Bar"
|
||||
|
||||
Behavior on fsTransitionProg {
|
||||
@@ -93,12 +93,6 @@ CustomWindow {
|
||||
panels.popouts.hasCurrent = false;
|
||||
}
|
||||
|
||||
Region {
|
||||
id: menuPopoutRegion
|
||||
|
||||
intersection: Intersection.Subtract
|
||||
}
|
||||
|
||||
Region {
|
||||
id: emptyRegion
|
||||
|
||||
@@ -106,17 +100,21 @@ CustomWindow {
|
||||
width: panels.notifications.width
|
||||
x: panels.notifications.x + root.borderThickness
|
||||
y: panels.notifications.y + bar.implicitHeight
|
||||
|
||||
Region {
|
||||
height: panels.osd.height
|
||||
width: panels.osdWrapper.width * (1 - panels.osd.offsetScale) + root.borderThickness
|
||||
x: root.width - width
|
||||
y: panels.osdWrapper.y + bar.implicitHeight
|
||||
}
|
||||
}
|
||||
|
||||
Region {
|
||||
id: region
|
||||
Regions {
|
||||
id: regions
|
||||
|
||||
height: root.height - bar.implicitHeight - root.borderThickness - root.dragMaskPadding * 2
|
||||
intersection: Intersection.Xor
|
||||
regions: [...popoutRegions.instances, menuPopoutRegion]
|
||||
width: root.width - root.borderThickness * 2 - root.dragMaskPadding * 2
|
||||
x: root.borderThickness + root.dragMaskPadding
|
||||
y: bar.implicitHeight + root.dragMaskPadding
|
||||
bar: bar
|
||||
panels: panels
|
||||
win: root
|
||||
}
|
||||
|
||||
anchors {
|
||||
@@ -126,22 +124,6 @@ CustomWindow {
|
||||
top: true
|
||||
}
|
||||
|
||||
Variants {
|
||||
id: popoutRegions
|
||||
|
||||
model: panels.children
|
||||
|
||||
Region {
|
||||
required property Item modelData
|
||||
|
||||
height: modelData.height
|
||||
intersection: Intersection.Subtract
|
||||
width: modelData.width
|
||||
x: modelData.x + root.borderThickness
|
||||
y: modelData.y + bar.implicitHeight
|
||||
}
|
||||
}
|
||||
|
||||
HyprlandFocusGrab {
|
||||
id: focusGrab
|
||||
|
||||
|
||||
Reference in New Issue
Block a user