summaryrefslogtreecommitdiff
path: root/bar/components/SimpleResource.qml
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-09-18 15:10:16 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-09-18 15:10:16 +0800
commit8a71bd72f53e3629fb1d23d7c1b153207ba44789 (patch)
tree3d91e82c5be62d6e65383df0b906e80c13f0a4cc /bar/components/SimpleResource.qml
parent654a198d61b82dba6203280163b5c92ed9d48ceb (diff)
feat: system tray
Diffstat (limited to 'bar/components/SimpleResource.qml')
-rw-r--r--bar/components/SimpleResource.qml8
1 files changed, 4 insertions, 4 deletions
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;
}
}
}