From 9436acd6268239c8b8eafde60840b4ce2c75708a Mon Sep 17 00:00:00 2001 From: zach Date: Mon, 1 Jun 2026 17:12:28 +0200 Subject: [PATCH] change charging color --- Config/DynamicColors.qml | 4 ++++ Helpers/Battery.qml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Config/DynamicColors.qml b/Config/DynamicColors.qml index fcb538b..040760d 100644 --- a/Config/DynamicColors.qml +++ b/Config/DynamicColors.qml @@ -115,6 +115,10 @@ Singleton { Config.save(); } + function swapRG(c: color): color { + return Qt.rgba(c.g, c.r, c.b, c.a); + } + Component.onCompleted: debounceTimer.triggered() Connections { diff --git a/Helpers/Battery.qml b/Helpers/Battery.qml index 3acf45c..2360386 100644 --- a/Helpers/Battery.qml +++ b/Helpers/Battery.qml @@ -10,8 +10,8 @@ Singleton { readonly property var colors: { if (deviceState === UPowerDeviceState.Charging || deviceState === UPowerDeviceState.FullyCharged) return { - fg: DynamicColors.palette.m3primary, - bg: DynamicColors.palette.m3onPrimary + fg: DynamicColors.swapRG(DynamicColors.palette.m3error), + bg: DynamicColors.swapRG(DynamicColors.palette.m3onError) }; else if (currentPerc <= 0.2) return {