summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-10-09 20:33:28 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-10-09 20:33:28 +0800
commiteab1e3e85c9b507f7112191ead48ecce553ec7c8 (patch)
treee3d8885c9074a4b4c315664f6a259f1d17adb3db
parent62be1d1a9e6b12fc4e908b694c62b0dc63a2f006 (diff)
fix(Resources): visual slider bg colors
-rw-r--r--bar/components/SimpleResource.qml4
1 files changed, 3 insertions, 1 deletions
diff --git a/bar/components/SimpleResource.qml b/bar/components/SimpleResource.qml
index 51490a2..6b52079 100644
--- a/bar/components/SimpleResource.qml
+++ b/bar/components/SimpleResource.qml
@@ -27,6 +27,8 @@ Item {
property bool isAlt: false
+ property color color: value < thresholdL1 ? Colors.accentAlt : value >= thresholdL3 ? thresholdColorL3 : value >= thresholdL2 ? thresholdColorL2 : thresholdColorL1
+
implicitWidth: layout.implicitWidth
implicitHeight: layout.implicitHeight
@@ -62,7 +64,7 @@ Item {
anchors.bottom: parent.bottom
width: parent.width
height: parent.height * pBar.visualPosition
- color: Qt.rgba(Colors.accentAlt.r, Colors.accentAlt.g, Colors.accentAlt.b, General.accentTransparency * 1.5)
+ color: Qt.rgba(root.color.r, root.color.g, root.color.b, General.accentTransparency * 1.5)
radius: Style.rounding.smaller
Behavior on width {