-
Notifications
You must be signed in to change notification settings - Fork 0
/
About.qml
205 lines (175 loc) · 4.91 KB
/
About.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
/*******************************************************************/
/* Original File Name: About.qml */
/* Date: 02-07-2018 */
/* Developer: Dionysus Benstein */
/* Copyright © 2018 Dionysus Benstein. All rights reserved. */
/* Description: Страница с информацией о программе и разработчиках.*/
/*******************************************************************/
import QtQuick 2.11
import QtQuick.Controls 2.3
import QtQuick.Controls.Material 2.3
Popup {
id: popup
x: Math.round((parent.width - width) / 2)
y: Math.round((parent.height - height) / 2)
width: 426; height: 320
parent: Overlay.overlay
modal: true
focus: true
clip: true
padding: 0
Rectangle {
id: aboutWndRect
width: aboutWndTitle.width + 50
anchors {
left: parent.left
top: parent.top
bottom: parent.bottom
}
color: primaryColor
radius: 2
clip: true
//for hide right radius of parent rectangle
Rectangle {
width: 2
height: parent.height
anchors.right: parent.right
color: parent.color
}
//for material design press animation
Button {
anchors.fill: parent
scale: 1.1
flat: true
}
}
Text {
id: aboutWndTitle
anchors {
left: parent.left
top: parent.top
margins: 25
}
color: "white"
text: qsTr("О программе"/*"About"*/)
font {
pixelSize: 20
family: robotoMediumFont.name
}
}
Image {
id: icon
anchors {
top: aboutWndTitle.bottom
topMargin: 25
horizontalCenter: aboutWndRect.horizontalCenter
}
source: "images/icon-100px.png"
}
Text {
id: appName
anchors {
left: parent.left
top: icon.bottom
leftMargin: 25
topMargin: 25
}
color: "white"
text: "<b>Counter</b>"
wrapMode: Text.WordWrap
font {
pixelSize: 18
family: robotoMediumFont.name
}
}
Text {
id: version
anchors {
left: parent.left
top: appName.bottom
leftMargin: 25
topMargin: 5
}
color: "white"
text: qsTr("Версия: " + appVersion)
wrapMode: Text.WordWrap
font {
pixelSize: 16
family: robotoMediumFont.name
}
}
Text {
id: author
anchors {
left: parent.left
top: version.bottom
leftMargin: 25
topMargin: 5
}
color: "white"
text: "Автор: \nDionysus Benstein"
wrapMode: Text.WordWrap
font {
pixelSize: 16
family: robotoMediumFont.name
}
}
Text {
id: about
anchors {
left: aboutWndRect.right
right: parent.right
top: parent.top
leftMargin: 19
rightMargin: 19
topMargin: 25
}
color: Material.theme === Material.Dark ? "white" : darkFontColor
wrapMode: Text.WordWrap
text: qsTr("<b>Counter</b> — бесплатное настольное кроссплатформенное приложение с открытыми
исходным кодом, которое подсчитывает количество символов и слов в тексте.")
font {
pixelSize: 16
family: robotoMediumFont.name
}
}
MouseArea {
anchors.fill: copyright
cursorShape: Qt.PointingHandCursor
}
Text {
id: copyright
anchors {
left: aboutWndRect.right
right: parent.right
top: about.bottom
leftMargin: 19
rightMargin: 19
topMargin: 25
}
text: qsTr("<a href=\"https://github.com/DionysusBenstein\">Copyright © 2018 Dionysus Benstein. Все права защищены.</a>")
linkColor: primaryColor
onLinkActivated: {
Qt.openUrlExternally("https://github.com/DionysusBenstein")
popup.close()
}
wrapMode: Text.WordWrap
font {
pixelSize: 15
family: robotoMediumFont.name
}
}
Button {
id: doneButton
anchors {
right: parent.right
bottom: parent.bottom
rightMargin: 8
bottomMargin: 2
}
flat: true
text: qsTr("OK")
Material.foreground: primaryColor
onClicked: popup.close()
}
}