-
Notifications
You must be signed in to change notification settings - Fork 1
/
PiholestatsTile.qml
80 lines (73 loc) · 1.79 KB
/
PiholestatsTile.qml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import QtQuick 2.1
import qb.components 1.0
Tile {
id: piholeTile
property bool dimState: screenStateController.dimmedColors
onClicked: {
stage.openFullscreen(app.piholeScreenUrl);
}
// Title
Text {
id: tiletitle
text: "PiHole Stats"
anchors {
baseline: parent.top
baselineOffset: isNxt ? 30 : 24
horizontalCenter: parent.horizontalCenter
}
font {
family: qfont.bold.name
pixelSize: isNxt ? 25 : 20
}
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.waTileTextColor : colors.waTileTextColor
}
// line 1 text
Text {
id: tileline1
text: "Ads blocked today: "
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.clockTileColor : colors.clockTileColor
anchors {
top: tiletitle.bottom
left: parent.left
leftMargin: isNxt ? 10 : 8
}
font.pixelSize: isNxt ? 25 : 20
font.family: qfont.italic.name
}
// line 2 text
Text {
id: tileline2
text: app.tmp_ads_blocked_today
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.clockTileColor : colors.clockTileColor
anchors {
left: tileline1.left
top: tileline1.bottom
}
font.pixelSize: isNxt ? 25 : 20
font.family: qfont.italic.name
}
// line 3 text
Text {
id: tileline3
text: "Percentage blocked: "
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.clockTileColor : colors.clockTileColor
anchors {
left: tileline2.left
top: tileline2.bottom
}
font.pixelSize: isNxt ? 25 : 20
font.family: qfont.italic.name
}
// line 4 text
Text {
id: tileline4
text: app.tmp_ads_percentage_today
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.clockTileColor : colors.clockTileColor
anchors {
left: tileline3.left
top: tileline3.bottom
}
font.pixelSize: isNxt ? 25 : 20
font.family: qfont.italic.name
}
}