support multiple monitors for greeter
This commit is contained in:
@@ -85,7 +85,7 @@ Singleton {
|
||||
}
|
||||
|
||||
FileView {
|
||||
path: `${Paths.state}/scheme.json`
|
||||
path: "/etc/zshell-greeter/scheme.json"
|
||||
watchChanges: true
|
||||
|
||||
onFileChanged: reload()
|
||||
|
||||
@@ -8,13 +8,23 @@ import qs.Config
|
||||
import qs.Helpers
|
||||
import qs.Components
|
||||
|
||||
CustomWindow {
|
||||
Scope {
|
||||
id: root
|
||||
|
||||
required property var greeter
|
||||
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
|
||||
CustomWindow {
|
||||
id: win
|
||||
|
||||
required property ShellScreen modelData
|
||||
|
||||
aboveWindows: true
|
||||
focusable: true
|
||||
name: "Greeter"
|
||||
screen: modelData
|
||||
|
||||
anchors {
|
||||
bottom: true
|
||||
@@ -71,7 +81,7 @@ CustomWindow {
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
property: "implicitWidth"
|
||||
target: lockContent
|
||||
to: (root.screen?.height ?? 0) * Config.lock.sizes.heightMult * Config.lock.sizes.ratio
|
||||
to: (win.screen?.height ?? 0) * Config.lock.sizes.heightMult * Config.lock.sizes.ratio
|
||||
}
|
||||
|
||||
Anim {
|
||||
@@ -79,7 +89,7 @@ CustomWindow {
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
property: "implicitHeight"
|
||||
target: lockContent
|
||||
to: (root.screen?.height ?? 0) * Config.lock.sizes.heightMult
|
||||
to: (win.screen?.height ?? 0) * Config.lock.sizes.heightMult
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,11 +143,13 @@ CustomWindow {
|
||||
|
||||
anchors.centerIn: parent
|
||||
greeter: root.greeter
|
||||
height: (root.screen?.height ?? 0) * Config.lock.sizes.heightMult - Appearance.padding.large * 2
|
||||
height: (win.screen?.height ?? 0) * Config.lock.sizes.heightMult - Appearance.padding.large * 2
|
||||
opacity: 0
|
||||
scale: 0
|
||||
screenHeight: root.screen?.height ?? 1440
|
||||
width: (root.screen?.height ?? 0) * Config.lock.sizes.heightMult * Config.lock.sizes.ratio - Appearance.padding.large * 2
|
||||
screenHeight: win.screen?.height ?? 1440
|
||||
width: (win.screen?.height ?? 0) * Config.lock.sizes.heightMult * Config.lock.sizes.ratio - Appearance.padding.large * 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user