summaryrefslogtreecommitdiff
path: root/sysinfowatchlet/metawatch-digital.qml
blob: 65e9a7d2e87e40702c5bc24cf01d1e662fb78414 (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 QtQuick 1.0

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
		}
	}
}