Optimization: Dock get loaded only on assigned screens instead of being invisble.
This commit is contained in:
parent
18b79913bd
commit
fcedb65119
1 changed files with 227 additions and 228 deletions
|
|
@ -9,17 +9,19 @@ import qs.Commons
|
|||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Loader {
|
||||
active: (Settings.data.dock.monitors.length > 0)
|
||||
sourceComponent: Component {
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
|
||||
PanelWindow {
|
||||
id: dockWindow
|
||||
Loader {
|
||||
|
||||
required property ShellScreen modelData
|
||||
readonly property real scaling: ScalingService.scale(screen)
|
||||
readonly property real scaling: ScalingService.scale(modelData)
|
||||
|
||||
active: modelData ? Settings.data.dock.monitors.includes(modelData.name) : false
|
||||
|
||||
sourceComponent: PanelWindow {
|
||||
id: dockWindow
|
||||
|
||||
screen: modelData
|
||||
|
||||
// Auto-hide properties - make reactive to settings changes
|
||||
|
|
@ -38,8 +40,6 @@ Loader {
|
|||
property bool anyAppHovered: false
|
||||
|
||||
// Dock is only shown if explicitely toggled
|
||||
visible: modelData ? Settings.data.dock.monitors.includes(modelData.name) : false
|
||||
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
|
||||
anchors.bottom: true
|
||||
|
|
@ -298,4 +298,3 @@ Loader {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue