summaryrefslogtreecommitdiff
path: root/modules/lock
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-07-02 17:09:49 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-07-02 17:09:49 +1000
commitd7802f3c4b594af54817808bf02bb0bacc106868 (patch)
tree134565d02cf2d2978dcb7bac68774e3ecbb8d092 /modules/lock
parentinternal: better curve for button ripples (diff)
downloadcaelestia-shell-d7802f3c4b594af54817808bf02bb0bacc106868.tar.gz
caelestia-shell-d7802f3c4b594af54817808bf02bb0bacc106868.tar.bz2
caelestia-shell-d7802f3c4b594af54817808bf02bb0bacc106868.zip
internal: use layer.effect
Also use clipping rect for wallpaper item
Diffstat (limited to 'modules/lock')
-rw-r--r--modules/lock/Backgrounds.qml22
-rw-r--r--modules/lock/LockSurface.qml43
-rw-r--r--modules/lock/Notification.qml17
3 files changed, 34 insertions, 48 deletions
diff --git a/modules/lock/Backgrounds.qml b/modules/lock/Backgrounds.qml
index c8c5db0..2041b99 100644
--- a/modules/lock/Backgrounds.qml
+++ b/modules/lock/Backgrounds.qml
@@ -1,3 +1,5 @@
+pragma ComponentBehavior: Bound
+
import "root:/widgets"
import "root:/services"
import "root:/config"
@@ -36,7 +38,15 @@ Item {
anchors.fill: parent
color: Colours.alpha(Colours.palette.m3surface, false)
- visible: false
+
+ layer.enabled: true
+ layer.effect: MultiEffect {
+ maskEnabled: true
+ maskInverted: true
+ maskSource: mask
+ maskThresholdMin: 0.5
+ maskSpreadAtMin: 1
+ }
}
Item {
@@ -59,16 +69,6 @@ Item {
}
}
- MultiEffect {
- anchors.fill: parent
- source: base
- maskEnabled: true
- maskInverted: true
- maskSource: mask
- maskThresholdMin: 0.5
- maskSpreadAtMin: 1
- }
-
Shape {
anchors.fill: parent
anchors.margins: Math.floor(innerMask.anchors.margins)
diff --git a/modules/lock/LockSurface.qml b/modules/lock/LockSurface.qml
index 83fb89f..0ad4c3a 100644
--- a/modules/lock/LockSurface.qml
+++ b/modules/lock/LockSurface.qml
@@ -40,30 +40,25 @@ WlSessionLockSurface {
}
ScreencopyView {
- id: screencopy
-
- anchors.fill: parent
- captureSource: root.screen
- visible: false
- }
-
- MultiEffect {
id: background
anchors.fill: parent
+ captureSource: root.screen
- source: screencopy
- autoPaddingEnabled: false
- blurEnabled: true
- blur: root.locked ? 1 : 0
- blurMax: 64
- blurMultiplier: 1
+ layer.enabled: true
+ layer.effect: MultiEffect {
+ autoPaddingEnabled: false
+ blurEnabled: true
+ blur: root.locked ? 1 : 0
+ blurMax: 64
+ blurMultiplier: 1
- Behavior on opacity {
- Anim {}
+ Behavior on blur {
+ Anim {}
+ }
}
- Behavior on blur {
+ Behavior on opacity {
Anim {}
}
}
@@ -79,15 +74,13 @@ WlSessionLockSurface {
statusHeight: status.item?.nonAnimHeight ?? 0
isNormal: root.screen.width > Config.lock.sizes.smallScreenWidth
isLarge: root.screen.width > Config.lock.sizes.largeScreenWidth
- visible: false
- }
- MultiEffect {
- anchors.fill: source
- source: backgrounds
- shadowEnabled: true
- blurMax: 15
- shadowColor: Qt.alpha(Colours.palette.m3shadow, 0.7)
+ layer.enabled: true
+ layer.effect: MultiEffect {
+ shadowEnabled: true
+ blurMax: 15
+ shadowColor: Qt.alpha(Colours.palette.m3shadow, 0.7)
+ }
}
Clock {
diff --git a/modules/lock/Notification.qml b/modules/lock/Notification.qml
index 936edd4..a2f23f6 100644
--- a/modules/lock/Notification.qml
+++ b/modules/lock/Notification.qml
@@ -123,26 +123,19 @@ StyledRect {
asynchronous: true
anchors.centerIn: parent
- visible: !root.modelData.appIcon.endsWith("symbolic")
width: Math.round(parent.width * 0.6)
height: Math.round(parent.width * 0.6)
sourceComponent: IconImage {
- implicitSize: Math.round(parent.width * 0.6)
+ anchors.fill: parent
source: Quickshell.iconPath(root.modelData.appIcon)
asynchronous: true
- }
- }
-
- Loader {
- active: root.modelData.appIcon.endsWith("symbolic")
- asynchronous: true
- anchors.fill: icon
- sourceComponent: Colouriser {
- source: icon
- colorizationColor: root.modelData.urgency === NotificationUrgency.Critical ? Colours.palette.m3onError : root.modelData.urgency === NotificationUrgency.Low ? Colours.palette.m3onSurface : Colours.palette.m3onTertiaryContainer
+ layer.enabled: root.modelData.appIcon.endsWith("symbolic")
+ layer.effect: Colouriser {
+ colorizationColor: root.modelData.urgency === NotificationUrgency.Critical ? Colours.palette.m3onError : root.modelData.urgency === NotificationUrgency.Low ? Colours.palette.m3onSurface : Colours.palette.m3onTertiaryContainer
+ }
}
}