LockScreen: add blur & tint option

This commit is contained in:
Lysec
2026-02-10 15:22:07 +01:00
parent 1521ae0c71
commit bfa58611f0
6 changed files with 75 additions and 1 deletions
@@ -1,7 +1,9 @@
import QtQuick
import QtQuick.Effects
import Quickshell
import qs.Commons
import qs.Services.Compositor
import qs.Services.Power
import qs.Services.UI
Item {
@@ -10,6 +12,7 @@ Item {
// Cached wallpaper path - exposed for parent components
property string resolvedWallpaperPath: ""
property color tintColor: Settings.data.colorSchemes.darkMode ? Color.mSurface : Color.mOnSurface
required property var screen
@@ -116,6 +119,21 @@ Item {
smooth: true
mipmap: false
antialiasing: true
layer.enabled: true
layer.smooth: false
layer.effect: MultiEffect {
blurEnabled: !PowerProfileService.noctaliaPerformanceMode && (Settings.data.general.lockScreenBlur > 0)
blur: Settings.data.general.lockScreenBlur
blurMax: 48
}
// Tint overlay
Rectangle {
anchors.fill: parent
color: root.tintColor
opacity: Settings.data.general.lockScreenTint
}
}
Rectangle {
@@ -139,4 +139,34 @@ ColumnLayout {
text: Math.round(Settings.data.general.lockScreenCountdownDuration / 1000) + "s"
defaultValue: Settings.getDefaultValue("general.lockScreenCountdownDuration")
}
NDivider {
Layout.fillWidth: true
}
NValueSlider {
Layout.fillWidth: true
label: I18n.tr("panels.lock-screen.lock-screen-blur-strength-label")
description: I18n.tr("panels.lock-screen.lock-screen-blur-strength-description")
from: 0.0
to: 1.0
stepSize: 0.01
value: Settings.data.general.lockScreenBlur
onMoved: value => Settings.data.general.lockScreenBlur = value
text: ((Settings.data.general.lockScreenBlur) * 100).toFixed(0) + "%"
defaultValue: Settings.getDefaultValue("general.lockScreenBlur")
}
NValueSlider {
Layout.fillWidth: true
label: I18n.tr("panels.lock-screen.lock-screen-tint-strength-label")
description: I18n.tr("panels.lock-screen.lock-screen-tint-strength-description")
from: 0.0
to: 1.0
stepSize: 0.01
value: Settings.data.general.lockScreenTint
onMoved: value => Settings.data.general.lockScreenTint = value
text: ((Settings.data.general.lockScreenTint) * 100).toFixed(0) + "%"
defaultValue: Settings.getDefaultValue("general.lockScreenTint")
}
}