summaryrefslogtreecommitdiff
path: root/sysinfowatchlet/metawatch-digital.qml
blob: 0d840d60221c0382cae490b1257e83b4401c0bac (plain)
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
38
39
40
41
42
43
44
45
46
import Qt 4.7

Rectangle {
	width: 96
	height: 96

	color: "white"

	Column {
		anchors.fill: parent
		spacing: 4

		Text {
			text: "Battery: " + batteryLevel + "%"
		}

		Rectangle {
			id: battery
			x: 12
			width: 72
			height: 16

			border.color: "black"
			border.width: 1

			Rectangle {
				width: (batteryLevel / 100) * parent.width
				height: parent.height

				color: "black"
			}
		}

		Text {
			width: parent.width
			text: "Connected to:"
		}

		Text {
			width: parent.width
			text: networkName
			horizontalAlignment: Text.AlignHCenter
			wrapMode: Text.Wrap
		}
	}
}