-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathWarningLight.qml
More file actions
37 lines (30 loc) · 974 Bytes
/
Copy pathWarningLight.qml
File metadata and controls
37 lines (30 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import QtQuick
// Single warning telltale — circular icon that lights up when active
Item {
id: root
// ── Public API ──
property string label: ""
property bool active: false
property color activeColor: "#ff5252" // red = critical, amber = warning, green = info
implicitWidth: 44
implicitHeight: 44
Rectangle {
anchors.centerIn: parent
width: 28
height: 28
radius: 14
color: "transparent"
border.color: root.active ? root.activeColor : "#3a4254"
border.width: 1.5
Behavior on border.color { ColorAnimation { duration: 200 } }
}
Text {
anchors.centerIn: parent
text: root.label
color: root.active ? root.activeColor : "#3a4254"
font.family: "Bahnschrift"
font.pixelSize: 9
font.weight: Font.Medium
Behavior on color { ColorAnimation { duration: 200 } }
}
}