This repository has been archived by the owner on Aug 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathabout.qml.in
158 lines (137 loc) · 5.84 KB
/
about.qml.in
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
/*
* About template
* By Joan CiberSheep using base file from uNav
*
* uNav is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* uNav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
import QtQuick 2.4
import Ubuntu.Components 1.3
//import Ubuntu.Components.ListItems 1.3 as ListItems
import "components"
Page {
id: aboutPage
title: i18n.tr("About")
//Colors
property string lighterColor: '#f7f6f5'
property string darkColor: '#0e8cba'
property string lightColor: '#e0e0e0'
//Margins
property int marginColumn: units.gu(1)
//Properties
property string iconAppRute: "../assets/logo.svg"
property string version: "@APP_VERSION@"
property string license: "<a href='https://www.gnu.org/licenses/gpl-2.0.html'>GPLv2</a>"
property string source: "<a href='https://github.com/cibersheep/quixe-qml'>Github</a>"
property string appName: "@APP_NAME@"
header: PageHeader {
id: pageHeader
title: i18n.tr("About")
StyleHints {
foregroundColor: lighterColor
backgroundColor: darkColor
dividerColor: lightColor
}
}
Flickable {
id: flickable
anchors.fill: parent
anchors.top: pageHeader.bottom
anchors {
fill: parent
bottomMargin: units.gu(5)
}
//contentHeight: levelHistoryColumn.height + units.gu(1)
ListModel {
id: gameStoriesModel
Component.onCompleted: initialize()
function initialize() {
gameStoriesModel.append({ category: i18n.tr("App Development"), mainText: "Joan CiberSheep", secondaryText: "", link: "https://cibersheep.com/" })
gameStoriesModel.append({ category: i18n.tr("Code Used from"), mainText: "Erkyrath", secondaryText: "Quixe (MIT)", license: "MIT", link: "https://github.com/erkyrath/quixe/" })
gameStoriesModel.append({ category: i18n.tr("Code Used from"), mainText: "Niklas Wenzel", secondaryText: "unzip code (GPL)", license: "GPL", link: "https://github.com/ubports/filemanager-app" })
gameStoriesModel.append({ category: i18n.tr("Code Used from"), mainText: "Brian Douglass", secondaryText: "DownloadInterceptor (GPLv3)", license: "GPL 3.0", link: "https://github.com/bhdouglass/downloadinterceptor" })
gameStoriesModel.append({ category: i18n.tr("Special Thanks to"), mainText: "Brian Douglass", secondaryText: i18n.tr("for his help with the code"), link: "http://bhdouglass.com/" })
gameStoriesModel.append({ category: i18n.tr("Special Thanks to"), mainText: "Mateo Salta", secondaryText: i18n.tr("for his help with the userScript to make it look good"), link: "https://github.com/mateosalta/" })
gameStoriesModel.append({ category: i18n.tr("Special Thanks to"), mainText: "Advocatux", secondaryText: i18n.tr("for his Spanish translation"), link: "https://github.com/advocatux/" })
gameStoriesModel.append({ category: i18n.tr("Icons"), mainText: i18n.tr("App Icon"), secondaryText: i18n.tr("Modification from Quixe icon"), link: "http://eblong.com/zarf/glulx/quixe/" })
}
}
ListView {
id: gameStoriesView
model: gameStoriesModel
anchors.fill: parent
section.property: "category"
section.criteria: ViewSection.FullString
section.delegate: ListItemHeader {
title: section
}
header: Item {
width: parent.width
height: iconTop.height + units.gu(28)
UbuntuShape {
id: iconTop
width: units.gu(20)
height: width
anchors{
horizontalCenter: parent.horizontalCenter
top: parent.top
topMargin: units.gu(12)
}
aspect: UbuntuShape.Flat
source: Image {
source: iconAppRute
}
}
Label {
id: appNameLabel
anchors.top: iconTop.bottom
anchors.topMargin: units.gu(4)
width: parent.width
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
text: i18n.tr(appName)
font.bold: true
}
Label {
id: appInfo
anchors.top: appNameLabel.bottom
anchors.topMargin: units.gu(2)
width: parent.width
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
text: i18n.tr("Version %1. Source %2").arg(version).arg(source)
onLinkActivated: Qt.openUrlExternally(link)
linkColor: darkColor
}
Label {
anchors.top: appInfo.bottom
anchors.topMargin: units.gu(2)
width: parent.width
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
text: i18n.tr("Under Lincense %1").arg(license)
onLinkActivated: Qt.openUrlExternally(link)
linkColor: darkColor
}
}
delegate: ListItem {
height: storiesDelegateLayout.height
divider.visible: false
ListItemLayout {
id: storiesDelegateLayout
title.text: mainText
subtitle.text: secondaryText
ProgressionSlot { name: link !== "" ? "next" : ""}
}
onClicked: model.link !== "" ? Qt.openUrlExternally(model.link) : null
}
}
}
}