support multiple monitors for greeter
This commit is contained in:
@@ -85,7 +85,7 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
FileView {
|
FileView {
|
||||||
path: `${Paths.state}/scheme.json`
|
path: "/etc/zshell-greeter/scheme.json"
|
||||||
watchChanges: true
|
watchChanges: true
|
||||||
|
|
||||||
onFileChanged: reload()
|
onFileChanged: reload()
|
||||||
|
|||||||
+117
-105
@@ -8,136 +8,148 @@ import qs.Config
|
|||||||
import qs.Helpers
|
import qs.Helpers
|
||||||
import qs.Components
|
import qs.Components
|
||||||
|
|
||||||
CustomWindow {
|
Scope {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property var greeter
|
required property var greeter
|
||||||
|
|
||||||
aboveWindows: true
|
Variants {
|
||||||
focusable: true
|
model: Quickshell.screens
|
||||||
|
|
||||||
anchors {
|
CustomWindow {
|
||||||
bottom: true
|
id: win
|
||||||
left: true
|
|
||||||
right: true
|
|
||||||
top: true
|
|
||||||
}
|
|
||||||
|
|
||||||
ParallelAnimation {
|
required property ShellScreen modelData
|
||||||
id: initAnim
|
|
||||||
|
|
||||||
running: true
|
aboveWindows: true
|
||||||
|
focusable: true
|
||||||
|
name: "Greeter"
|
||||||
|
screen: modelData
|
||||||
|
|
||||||
SequentialAnimation {
|
anchors {
|
||||||
ParallelAnimation {
|
bottom: true
|
||||||
Anim {
|
left: true
|
||||||
duration: Appearance.anim.durations.expressiveFastSpatial
|
right: true
|
||||||
easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial
|
top: true
|
||||||
property: "scale"
|
|
||||||
target: lockContent
|
|
||||||
to: 1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
Anim {
|
id: initAnim
|
||||||
property: "opacity"
|
|
||||||
target: lockIcon
|
|
||||||
to: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
Anim {
|
running: true
|
||||||
property: "opacity"
|
|
||||||
target: content
|
|
||||||
to: 1
|
|
||||||
}
|
|
||||||
|
|
||||||
Anim {
|
SequentialAnimation {
|
||||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
ParallelAnimation {
|
||||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
Anim {
|
||||||
property: "scale"
|
duration: Appearance.anim.durations.expressiveFastSpatial
|
||||||
target: content
|
easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial
|
||||||
to: 1
|
property: "scale"
|
||||||
}
|
target: lockContent
|
||||||
|
to: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Anim {
|
ParallelAnimation {
|
||||||
property: "radius"
|
Anim {
|
||||||
target: lockBg
|
property: "opacity"
|
||||||
to: Appearance.rounding.large * 1.5
|
target: lockIcon
|
||||||
}
|
to: 0
|
||||||
|
}
|
||||||
|
|
||||||
Anim {
|
Anim {
|
||||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
property: "opacity"
|
||||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
target: content
|
||||||
property: "implicitWidth"
|
to: 1
|
||||||
target: lockContent
|
}
|
||||||
to: (root.screen?.height ?? 0) * Config.lock.sizes.heightMult * Config.lock.sizes.ratio
|
|
||||||
}
|
|
||||||
|
|
||||||
Anim {
|
Anim {
|
||||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||||
property: "implicitHeight"
|
property: "scale"
|
||||||
target: lockContent
|
target: content
|
||||||
to: (root.screen?.height ?? 0) * Config.lock.sizes.heightMult
|
to: 1
|
||||||
|
}
|
||||||
|
|
||||||
|
Anim {
|
||||||
|
property: "radius"
|
||||||
|
target: lockBg
|
||||||
|
to: Appearance.rounding.large * 1.5
|
||||||
|
}
|
||||||
|
|
||||||
|
Anim {
|
||||||
|
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||||
|
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||||
|
property: "implicitWidth"
|
||||||
|
target: lockContent
|
||||||
|
to: (win.screen?.height ?? 0) * Config.lock.sizes.heightMult * Config.lock.sizes.ratio
|
||||||
|
}
|
||||||
|
|
||||||
|
Anim {
|
||||||
|
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||||
|
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||||
|
property: "implicitHeight"
|
||||||
|
target: lockContent
|
||||||
|
to: (win.screen?.height ?? 0) * Config.lock.sizes.heightMult
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: background
|
id: background
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
source: WallpaperPath.lockscreenBg
|
source: WallpaperPath.lockscreenBg
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: lockContent
|
|
||||||
|
|
||||||
readonly property int radius: size / 4 * Appearance.rounding.scale
|
|
||||||
readonly property int size: lockIcon.implicitHeight + Appearance.padding.large * 4
|
|
||||||
|
|
||||||
anchors.centerIn: parent
|
|
||||||
implicitHeight: size
|
|
||||||
implicitWidth: size
|
|
||||||
scale: 0
|
|
||||||
|
|
||||||
CustomRect {
|
|
||||||
id: lockBg
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
color: DynamicColors.palette.m3surface
|
|
||||||
layer.enabled: true
|
|
||||||
opacity: DynamicColors.transparency.enabled ? DynamicColors.transparency.base : 1
|
|
||||||
radius: lockContent.radius
|
|
||||||
|
|
||||||
layer.effect: MultiEffect {
|
|
||||||
blurMax: 15
|
|
||||||
shadowColor: Qt.alpha(DynamicColors.palette.m3shadow, 0.7)
|
|
||||||
shadowEnabled: true
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
MaterialIcon {
|
Item {
|
||||||
id: lockIcon
|
id: lockContent
|
||||||
|
|
||||||
anchors.centerIn: parent
|
readonly property int radius: size / 4 * Appearance.rounding.scale
|
||||||
font.bold: true
|
readonly property int size: lockIcon.implicitHeight + Appearance.padding.large * 4
|
||||||
font.pointSize: Appearance.font.size.extraLarge * 4
|
|
||||||
text: "lock"
|
|
||||||
}
|
|
||||||
|
|
||||||
Content {
|
anchors.centerIn: parent
|
||||||
id: content
|
implicitHeight: size
|
||||||
|
implicitWidth: size
|
||||||
|
scale: 0
|
||||||
|
|
||||||
anchors.centerIn: parent
|
CustomRect {
|
||||||
greeter: root.greeter
|
id: lockBg
|
||||||
height: (root.screen?.height ?? 0) * Config.lock.sizes.heightMult - Appearance.padding.large * 2
|
|
||||||
opacity: 0
|
anchors.fill: parent
|
||||||
scale: 0
|
color: DynamicColors.palette.m3surface
|
||||||
screenHeight: root.screen?.height ?? 1440
|
layer.enabled: true
|
||||||
width: (root.screen?.height ?? 0) * Config.lock.sizes.heightMult * Config.lock.sizes.ratio - Appearance.padding.large * 2
|
opacity: DynamicColors.transparency.enabled ? DynamicColors.transparency.base : 1
|
||||||
|
radius: lockContent.radius
|
||||||
|
|
||||||
|
layer.effect: MultiEffect {
|
||||||
|
blurMax: 15
|
||||||
|
shadowColor: Qt.alpha(DynamicColors.palette.m3shadow, 0.7)
|
||||||
|
shadowEnabled: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MaterialIcon {
|
||||||
|
id: lockIcon
|
||||||
|
|
||||||
|
anchors.centerIn: parent
|
||||||
|
font.bold: true
|
||||||
|
font.pointSize: Appearance.font.size.extraLarge * 4
|
||||||
|
text: "lock"
|
||||||
|
}
|
||||||
|
|
||||||
|
Content {
|
||||||
|
id: content
|
||||||
|
|
||||||
|
anchors.centerIn: parent
|
||||||
|
greeter: root.greeter
|
||||||
|
height: (win.screen?.height ?? 0) * Config.lock.sizes.heightMult - Appearance.padding.large * 2
|
||||||
|
opacity: 0
|
||||||
|
scale: 0
|
||||||
|
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