-
Notifications
You must be signed in to change notification settings - Fork 150
/
AboutDialog.qml
99 lines (87 loc) · 3.42 KB
/
AboutDialog.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
/*
* Fedora Media Writer
* Copyright (C) 2021-2022 Evžen Gasta <evzen.ml@seznam.cz>
*
* This program 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 2
* of the License, or (at your option) any later version.
*
* This program 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 6.2
import QtQuick.Controls 6.2
import QtQuick.Window 6.2
import QtQuick.Layouts 6.2
import QtQml 6.2
ApplicationWindow {
id: aboutDialog
minimumWidth: Math.max(420, units.gridUnit * 22)
maximumWidth: Math.max(420, units.gridUnit * 22)
minimumHeight: Math.max(240, units.gridUnit * 12)
maximumHeight: Math.max(240, units.gridUnit * 12)
modality: Qt.ApplicationModal
x: Screen.width / 2 - width / 2
y: Screen.height / 2 - height / 2
title: " "
ColumnLayout {
id: mainColumn
anchors.fill: parent
anchors.margins: units.gridUnit
spacing: units.gridUnit
Column {
leftPadding: units.gridUnit
rightPadding: units.gridUnit
spacing: units.gridUnit
Heading {
Layout.alignment: Qt.AlignHCenter
text: qsTr("About Fedora Media Writer")
level: 3
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
width: mainColumn.width - units.gridUnit * 2
}
Label {
width: mainColumn.width - units.gridUnit * 2
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
text: qsTr("Version %1").arg(mediawriterVersion)
}
Label {
width: mainColumn.width - units.gridUnit * 2
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
visible: releases.beingUpdated
text: qsTr("Fedora Media Writer is now checking for new releases")
}
Label {
width: mainColumn.width - units.gridUnit * 2
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
text: qsTr("Please report bugs or your suggestions on %1").arg("<a href=\"https://github.com/FedoraQt/MediaWriter/issues\">https://github.com/FedoraQt/MediaWriter/</a>")
textFormat: Text.RichText
onLinkActivated: Qt.openUrlExternally(link)
opacity: 0.6
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
}
}
}
RowLayout {
Layout.alignment: Qt.AlignBottom
Item {
Layout.fillWidth: true
}
Button {
id: closeButton
onClicked: aboutDialog.close()
text: qsTr("Close")
}
}
}
}