forked from Shinonome/dots-hyprland
dock: unload when not needed
This commit is contained in:
@@ -18,10 +18,15 @@ Scope { // Scope
|
||||
|
||||
Variants { // For each monitor
|
||||
model: Quickshell.screens
|
||||
PanelWindow { // Window
|
||||
|
||||
Loader {
|
||||
id: dockLoader
|
||||
required property var modelData
|
||||
active: ConfigOptions?.dock.hoverToReveal || (!ToplevelManager.activeToplevel?.activated)
|
||||
|
||||
sourceComponent: PanelWindow { // Window
|
||||
id: dockRoot
|
||||
screen: modelData
|
||||
screen: dockLoader.modelData
|
||||
|
||||
property bool reveal: root.pinned
|
||||
|| (ConfigOptions?.dock.hoverToReveal && dockMouseArea.containsMouse)
|
||||
@@ -34,9 +39,6 @@ Scope { // Scope
|
||||
right: true
|
||||
}
|
||||
|
||||
function hide() {
|
||||
cheatsheetLoader.active = false
|
||||
}
|
||||
exclusiveZone: root.pinned ? implicitHeight
|
||||
- (Appearance.sizes.hyprlandGapsOut)
|
||||
- (Appearance.sizes.elevationMargin - Appearance.sizes.hyprlandGapsOut) : 0
|
||||
@@ -142,4 +144,5 @@ Scope { // Scope
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user