-
Notifications
You must be signed in to change notification settings - Fork 1
/
EULA.qml
126 lines (112 loc) · 3.37 KB
/
EULA.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
import QtQuick 2.8
import QtGraphicalEffects 1.0
import QtGraphicalEffects 1.0
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.2
import QtQuick.LocalStorage 2.0 as Sql
import "eula.js" as Eula
import "markdown.js" as MD
Item {
id: thisWindow
property string theeula: ""
property string date: ""
Timer {
id: eulacheck
interval: 1000
running: true
repeat: true
onTriggered: {
Eula.get_eula()
}
}
Rectangle {
id: internalArea
anchors.fill: parent
color: backgroundColor
border.color: "black"
border.width: 1
Text {
id: title
text: qsTr("Agreement")
font.pixelSize: mainView.width * 0.1
anchors.left: parent.left
anchors.leftMargin: mainView.width * 0.03
anchors.top: parent.top
anchors.topMargin: mainView.width * 0.01
color: fontColorTitle
}
Text {
id: thedate
text: date
font.pixelSize: mainView.width * 0.04
anchors.right: parent.right
anchors.rightMargin: mainView.width * 0.03
anchors.bottom: title.bottom
anchors.bottomMargin: mainView.width * 0.01
color: fontColor
}
Rectangle {
width: parent.width
height: mainView.width * 0.01
color: seperatorColor1
anchors.top: title.bottom
}
Flickable {
anchors.top: title.bottom
anchors.topMargin: mainView.width * 0.01
anchors.bottom: okay.top
width: parent.width
contentHeight: news.height
clip: true
Text {
id: news
text: "<p>" + MD.md2html(theeula) + "</p>"
width: mainView.width * 0.93
padding: mainView.width * 0.02
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignLeft
anchors.horizontalCenter: parent.horizontalCenter
color: fontColor
}
}
Button {
id: cancel
anchors.bottom: parent.bottom
anchors.bottomMargin: mainView.width * 0.01
anchors.left: parent.left
anchors.leftMargin: mainView.width * 0.01
width: parent.width * 0.30
height: mainView.width * 0.1
text: "Cancel"
onClicked: thisWindow.visible = false
background: Rectangle {
color: highLightColor1
radius: mainView.width * 0.01
}
}
Button {
id: okay
anchors.bottom: parent.bottom
anchors.bottomMargin: mainView.width * 0.01
anchors.right: parent.right
anchors.rightMargin: mainView.width * 0.01
width: parent.width * 0.30
height: mainView.width * 0.1
text: "Okay"
onClicked: Eula.dismiss_eula(date)
background: Rectangle {
color: highLightColor1
radius: mainView.width * 0.01
}
}
}
DropShadow {
anchors.fill: internalArea
horizontalOffset: 0
verticalOffset: 4
radius: 8.0
samples: 17
color: "#80000000"
source: internalArea
}
}