blob: 3823cf23fe204c7132c4a1893bf556547f79001f (
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
import QtQuick 2.0
import Sailfish.Silica 1.0
import RockPool 1.0
Item {
id: root
property bool isSystemApp: false
property string uuid: ""
property string iconSource: ""
Rectangle {
anchors.fill: parent
visible: root.isSystemApp
color: {
switch (root.uuid) {
case "{07e0d9cb-8957-4bf7-9d42-35bf47caadfe}":
return "gray";
case "{18e443ce-38fd-47c8-84d5-6d0c775fbe55}":
return "blue";
case "{36d8c6ed-4c83-4fa1-a9e2-8f12dc941f8c}":
return UbuntuColors.red;
case "{1f03293d-47af-4f28-b960-f2b02a6dd757}":
return "gold"
case "{b2cae818-10f8-46df-ad2b-98ad2254a3c1}":
return "darkviolet"
case "{67a32d95-ef69-46d4-a0b9-854cc62f97f9}":
return "green";
case "{8f3c8686-31a1-4f5f-91f5-01600c9bdc59}":
return "black"
}
return "";
}
}
IconButton {
anchors.fill: parent
implicitHeight: height
//anchors.margins: units.gu(1)
visible: root.isSystemApp
icon.source: {
switch (root.uuid) {
case "{07e0d9cb-8957-4bf7-9d42-35bf47caadfe}":
return "image://theme/icon-m-developer-mode";
case "{18e443ce-38fd-47c8-84d5-6d0c775fbe55}":
return "image://theme/icon-m-clock";
case "{36d8c6ed-4c83-4fa1-a9e2-8f12dc941f8c}":
return "image://theme/icon-m-like";
case "{1f03293d-47af-4f28-b960-f2b02a6dd757}":
return "image://theme/icon-m-music";
case "{b2cae818-10f8-46df-ad2b-98ad2254a3c1}":
return "image://theme/icon-m-notifications";
case "{67a32d95-ef69-46d4-a0b9-854cc62f97f9}":
return "image://theme/icon-m-alarm";
case "{8f3c8686-31a1-4f5f-91f5-01600c9bdc59}":
return "image://theme/icon-m-clock";
}
return "";
}
}
Image {
source: root.isSystemApp ? "" : "file://" + root.iconSource;
anchors.fill: parent
visible: !root.isSystemApp
}
}
|