From eab1e3e85c9b507f7112191ead48ecce553ec7c8 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Thu, 9 Oct 2025 20:33:28 +0800 Subject: fix(Resources): visual slider bg colors --- bar/components/SimpleResource.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bar/components/SimpleResource.qml') 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 { -- cgit v1.2.3