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
|
Variants { // For each monitor
|
||||||
model: Quickshell.screens
|
model: Quickshell.screens
|
||||||
PanelWindow { // Window
|
|
||||||
|
Loader {
|
||||||
|
id: dockLoader
|
||||||
required property var modelData
|
required property var modelData
|
||||||
|
active: ConfigOptions?.dock.hoverToReveal || (!ToplevelManager.activeToplevel?.activated)
|
||||||
|
|
||||||
|
sourceComponent: PanelWindow { // Window
|
||||||
id: dockRoot
|
id: dockRoot
|
||||||
screen: modelData
|
screen: dockLoader.modelData
|
||||||
|
|
||||||
property bool reveal: root.pinned
|
property bool reveal: root.pinned
|
||||||
|| (ConfigOptions?.dock.hoverToReveal && dockMouseArea.containsMouse)
|
|| (ConfigOptions?.dock.hoverToReveal && dockMouseArea.containsMouse)
|
||||||
@@ -34,9 +39,6 @@ Scope { // Scope
|
|||||||
right: true
|
right: true
|
||||||
}
|
}
|
||||||
|
|
||||||
function hide() {
|
|
||||||
cheatsheetLoader.active = false
|
|
||||||
}
|
|
||||||
exclusiveZone: root.pinned ? implicitHeight
|
exclusiveZone: root.pinned ? implicitHeight
|
||||||
- (Appearance.sizes.hyprlandGapsOut)
|
- (Appearance.sizes.hyprlandGapsOut)
|
||||||
- (Appearance.sizes.elevationMargin - Appearance.sizes.hyprlandGapsOut) : 0
|
- (Appearance.sizes.elevationMargin - Appearance.sizes.hyprlandGapsOut) : 0
|
||||||
@@ -143,3 +145,4 @@ Scope { // Scope
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user