-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAbout.qml
100 lines (87 loc) · 2.5 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
import QtQuick 2.5
import QtQuick.Controls 2.0
Rectangle {
id: rect
color: "#eee"
// Information text
Text {
id: txtInfo
anchors {
top: parent.top
topMargin: 40
right: parent.right
rightMargin: 40
left: parent.left
leftMargin: 40
bottomMargin: 40
}
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
onLinkActivated: Qt.openUrlExternally(link)
text: qsTr("Chocal Chat is a free software that will run in your local network to provide a cross platform solution for communicating between each other.<br/><br/>This program is the server application.<br/><br/>Developer: <a href=\"https://hesam.org\">Hesam Gholami</a><br/><br/>This project is available <a href=\"https://github.com/J-TAG/chocal-chat-server\">on github</a>")
}
// Pure Soft logo
Image {
id: imgPure
source: "qrc:/img/img/puresoft-logo.png"
anchors {
top: txtInfo.bottom
horizontalCenter: txtInfo.horizontalCenter
}
}
// Copyright text
Text {
id: txtCopyright
anchors {
top: imgPure.bottom
horizontalCenter: txtInfo.horizontalCenter
}
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
onLinkActivated: Qt.openUrlExternally(link)
text: qsTr('All rights reserved. 2012 - 2016 by <a href="https://puresoftware.org">Pure Soft</a>')
}
// Close button
Button {
anchors {
top: txtCopyright.bottom
topMargin: 10
horizontalCenter: txtCopyright.horizontalCenter
}
text: qsTr("OK")
onClicked: {
rect.state = "hide"
flipable.flipped = true
}
}
// Transitions
transitions: Transition {
// smoothly fade question
PropertyAnimation{
property: "opacity"
easing.type: Easing.OutExpo
duration: 1000
}
}
// States
states: [
// For showing about box
State {
name: "show"
PropertyChanges {
target: rect
opacity: .8
enabled: true
}
},
// For hiding about box
State {
name: "hide"
PropertyChanges {
target: rect
opacity: 0
enabled: false
}
}
]
}