File tree Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ qt_add_qml_module(${APP_TARGET}
1313 VERSION 1.0
1414 QML_FILES
1515 qml/main.qml
16+ qml/dialogs/AboutDialog.qml
1617)
1718
1819set (QML_IMPORT_PATH "${QML_IMPORT_PATH} ;${CMAKE_CURRENT_LIST_DIR} "
Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: GPL-3.0-or-later
2+
3+ import QtQuick
4+ import QtQuick.Controls
5+ import QtQuick.Layouts
6+ import ScratchCPP.Ui
7+ import ScratchCPP.UiComponents
8+
9+ CustomDialog {
10+ // : For example "About ScratchCPP" (%1 is the app name)
11+ title: qsTr (" About %1" ).arg (Qt .application .displayName )
12+ standardButtons: Dialog .Ok
13+
14+ contentItem: RowLayout {
15+ spacing: 25
16+
17+ /* Image {
18+ source: "qrc:/res/images/icon.ico"
19+ sourceSize.width: 60
20+ sourceSize.height: 60
21+ Layout.alignment: Qt.AlignTop
22+ }*/
23+
24+ ColumnLayout {
25+ Label {
26+ text: Qt .application .displayName
27+ font .bold : true
28+ }
29+
30+ Label {}
31+
32+ Label {
33+ text: qsTr (" Version: %1" ).arg (Qt .application .version )
34+ }
35+
36+ Label {
37+ text: qsTr (" Revision: %1" ).arg (AppInfo .revision ())
38+ }
39+
40+ Label {
41+ readonly property string src: " https://github.com/scratchcpp/scratchcpp-player"
42+ text: qsTr (" Source code: %1" ).arg (" <a href=\" " + src + " \" >" + src + " </a>" )
43+ onLinkActivated : (link )=> Qt .openUrlExternally (link)
44+ }
45+
46+ Label {}
47+
48+ Label {
49+ readonly property int startYear: 2024
50+ readonly property string startStr: AppInfo .buildYear () === startYear ? " " : startYear + " -"
51+ text: " Copyright © " + startStr + AppInfo .buildYear () + " adazem009"
52+ }
53+
54+ Label {
55+ text: qsTr (" Published with the GNU General Public License." )
56+ }
57+ }
58+ }
59+ }
You can’t perform that action at this time.
0 commit comments