diff --git a/.config/quickshell/ii/modules/background/Background.qml b/.config/quickshell/ii/modules/background/Background.qml index 8b054fc9..84eadd9d 100644 --- a/.config/quickshell/ii/modules/background/Background.qml +++ b/.config/quickshell/ii/modules/background/Background.qml @@ -57,7 +57,7 @@ Variants { property real clockX: (modelData.width / 2) property real clockY: (modelData.height / 2) property var textHorizontalAlignment: { - if (Config.options.background.blur.enable && Config.options.background.blur.centerClock && GlobalStates.screenLocked) + if (Config.options.background.lockBlur.enable && Config.options.background.lockBlur.centerClock && GlobalStates.screenLocked) return Text.AlignHCenter; if (clockX < screen.width / 3) return Text.AlignLeft; @@ -66,10 +66,13 @@ Variants { return Text.AlignHCenter; } // Colors + property bool shouldBlur: (GlobalStates.screenLocked && Config.options.background.lockBlur.enable) property color dominantColor: Appearance.colors.colPrimary property bool dominantColorIsDark: dominantColor.hslLightness < 0.5 - property color colText: CF.ColorUtils.colorWithLightness(Appearance.colors.colPrimary, (dominantColorIsDark ? 0.8 : 0.12)) - property bool shouldBlur: (GlobalStates.screenLocked && Config.options.background.blur.enable) + property color colText: (GlobalStates.screenLocked && shouldBlur) ? Appearance.colors.colSecondary : CF.ColorUtils.colorWithLightness(Appearance.colors.colPrimary, (dominantColorIsDark ? 0.8 : 0.12)) + Behavior on colText { + animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this) + } // Layer props screen: modelData @@ -227,9 +230,9 @@ Variants { Loader { id: blurLoader - active: Config.options.background.blur.enable && (GlobalStates.screenLocked || scaleAnim.running) + active: Config.options.background.lockBlur.enable && (GlobalStates.screenLocked || scaleAnim.running) anchors.fill: wallpaper - scale: GlobalStates.screenLocked ? Config.options.background.blur.extraZoom : 1 + scale: GlobalStates.screenLocked ? Config.options.background.lockBlur.extraZoom : 1 Behavior on scale { NumberAnimation { id: scaleAnim @@ -240,7 +243,7 @@ Variants { } sourceComponent: GaussianBlur { source: wallpaper - radius: GlobalStates.screenLocked ? Config.options.background.blur.radius : 0 + radius: GlobalStates.screenLocked ? Config.options.background.lockBlur.radius : 0 samples: radius * 2 + 1 Rectangle { @@ -355,7 +358,7 @@ Variants { leftMargin: -5 rightMargin: -5 } - opacity: GlobalStates.screenLocked && (!Config.options.background.blur.enable || Config.options.background.blur.showLockedText) ? 1 : 0 + opacity: GlobalStates.screenLocked && (!Config.options.background.lockBlur.enable || Config.options.background.lockBlur.showLockedText) ? 1 : 0 visible: opacity > 0 Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index c95b148c..2fef550c 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -135,8 +135,8 @@ Singleton { property real workspaceZoom: 1.07 // Relative to your screen, not wallpaper size property bool enableSidebar: true } - property JsonObject blur: JsonObject { - property bool enable: true + property JsonObject lockBlur: JsonObject { + property bool enable: false property int radius: 100 property bool centerClock: true property bool showLockedText: true