-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOptionsPage.qml
executable file
·110 lines (85 loc) · 2.4 KB
/
OptionsPage.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import QtQuick 2.6
import "."
Rectangle{
id: themeRect
width: parent.width
color: Style.specialMainColor
signal backPressed()
signal aboutClicked()
signal manualClicekd()
signal themeClicked(int A)
Text{
id: themeText
text: "Theme"
padding: 6
font.pointSize: Qt.platform.os == "android" ? 20:15
height: backRect.height
color: Style.specialTextColor
anchors.horizontalCenter: parent.horizontalCenter
}
Row{
id: themesRow
width: parent.width*4/5
anchors{
top: themeText.bottom
horizontalCenter: parent.horizontalCenter
}
spacing: 6
Repeater {
id: repeater
model: 5
property var colorSet1: ["#1abc9c", "#2ecc71", "#e74c3c", "#f1c40f", "#34495e"]
property var colorSet2: ["#16a085", "#27ae60", "#c0392b", "#f39c12", "#2c3e50"]
delegate: Rectangle{
height: width
width: (themesRow.width-24)/5
color: "red"
Rectangle{
height: parent.height/2
color: repeater.colorSet1[index]
anchors{
top: parent.top
left: parent.left
right: parent.right
}
}
Rectangle{
height: parent.height/2
color: repeater.colorSet2[index]
anchors{
bottom: parent.bottom
left: parent.left
right: parent.right
}
}
MouseArea{
anchors.fill: parent
onClicked: themeClicked(index+1)
}
}
}
}
Rectangle{
id: backRect
color: Style.specialMainColor
height: parent.height/10
width: height
anchors{
top: parent.top
left: parent.left
}
Text {
id: optionsText
text: "<--"
color: Style.specialTextColor
anchors.centerIn: parent
}
MouseArea{
id: optionsMouseArea
anchors.fill: parent
onClicked: {
backPressed()
}
}
}
}