change charging color
This commit is contained in:
@@ -115,6 +115,10 @@ Singleton {
|
|||||||
Config.save();
|
Config.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function swapRG(c: color): color {
|
||||||
|
return Qt.rgba(c.g, c.r, c.b, c.a);
|
||||||
|
}
|
||||||
|
|
||||||
Component.onCompleted: debounceTimer.triggered()
|
Component.onCompleted: debounceTimer.triggered()
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
|||||||
+2
-2
@@ -10,8 +10,8 @@ Singleton {
|
|||||||
readonly property var colors: {
|
readonly property var colors: {
|
||||||
if (deviceState === UPowerDeviceState.Charging || deviceState === UPowerDeviceState.FullyCharged)
|
if (deviceState === UPowerDeviceState.Charging || deviceState === UPowerDeviceState.FullyCharged)
|
||||||
return {
|
return {
|
||||||
fg: DynamicColors.palette.m3primary,
|
fg: DynamicColors.swapRG(DynamicColors.palette.m3error),
|
||||||
bg: DynamicColors.palette.m3onPrimary
|
bg: DynamicColors.swapRG(DynamicColors.palette.m3onError)
|
||||||
};
|
};
|
||||||
else if (currentPerc <= 0.2)
|
else if (currentPerc <= 0.2)
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user