From 8a71bd72f53e3629fb1d23d7c1b153207ba44789 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Fri, 18 Sep 2026 15:10:16 +0800 Subject: feat: system tray --- bar/components/SimpleResource.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bar/components/SimpleResource.qml') diff --git a/bar/components/SimpleResource.qml b/bar/components/SimpleResource.qml index 6159f62..54564c3 100644 --- a/bar/components/SimpleResource.qml +++ b/bar/components/SimpleResource.qml @@ -25,7 +25,7 @@ Item { property color thresholdColorL2: Colors.yellow property color thresholdColorL3: Colors.red - property bool isAlt: false + property bool alt: false property color color: value < thresholdL1 ? Colors.accentAlt : value >= thresholdL3 ? thresholdColorL3 : value >= thresholdL2 ? thresholdColorL2 : thresholdColorL1 @@ -53,7 +53,7 @@ Item { handle: Item from: 0 to: 100 - value: !root.isAlt ? root.value : root.altValue + value: !root.alt ? root.value : root.altValue background: IRect { anchors.fill: parent color: "transparent" @@ -81,7 +81,7 @@ Item { centerIn: parent } iconSize: Style.font.size.small - text: !root.isAlt ? root.icon : root.altIcon + text: !root.alt ? root.icon : root.altIcon color: root.value < root.thresholdL1 ? Colors.foreground2 : root.value >= root.thresholdL3 ? root.thresholdColorL3 : root.value >= root.thresholdL2 ? root.thresholdColorL2 : root.thresholdColorL1 } } @@ -94,7 +94,7 @@ Item { anchors.fill: parent cursorShape: altValue != value ? Qt.PointingHandCursor : Qt.ArrowCursor onClicked: { - root.isAlt = !root.isAlt; + root.alt = !root.alt; } } } -- cgit v1.2.3