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 {