Skip to content

Commit 6376005

Browse files
jarolrodJohnny Carlson
authored andcommitted
qml: entangle the About and Developer options pages
Currently, the parent SwipeView of the AboutOptions page needs to have an id of introductions. We abuse the knowledge that in our codebase we will have that available, but this limits when and where the AboutOptions can be used. This entangles the About and Developer options so that we can avoid this, and have these pages truly be reusable. Github-Pull: #203 Rebased-From: 6ac40e8 Co-Authored-By: Johnny Carlson <johncarlson@pm.me>
1 parent af1ca17 commit 6376005

File tree

3 files changed

+35
-23
lines changed

3 files changed

+35
-23
lines changed

src/qml/BitcoinApp/Components/AboutOptions.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ ColumnLayout {
5656
icon.width: 18
5757
background: null
5858
onClicked: {
59-
introductions.incrementCurrentIndex()
59+
aboutSwipe.incrementCurrentIndex()
6060
}
6161
}
6262
}

src/qml/BitcoinApp/OnboardingCover.qml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,5 @@ Page {
5151
}
5252
}
5353
}
54-
SettingsDeveloper {
55-
navLeftDetail: NavButton {
56-
iconSource: "image://images/caret-left"
57-
text: qsTr("Back")
58-
onClicked: {
59-
introductions.decrementCurrentIndex()
60-
}
61-
}
62-
}
6354
}
6455
}

src/qml/BitcoinApp/SettingsAbout.qml

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,40 @@ import QtQuick.Layouts
88
import BitcoinApp.Controls
99
import BitcoinApp.Components
1010

11-
InformationPage {
12-
bannerActive: false
13-
bold: true
14-
headerText: qsTr("About")
15-
headerMargin: 0
16-
description: qsTr("Bitcoin Core is an open source project.\nIf you find it useful, please contribute.\n\n This is experimental software.")
17-
descriptionMargin: 20
18-
detailActive: true
19-
detailItem: ColumnLayout {
20-
spacing: 0
21-
AboutOptions {
22-
Layout.maximumWidth: 450
23-
Layout.alignment: Qt.AlignCenter
11+
Item {
12+
property alias navLeftDetail: aboutSwipe.navLeftDetail
13+
SwipeView {
14+
id: aboutSwipe
15+
property alias navLeftDetail: about_settings.navLeftDetail
16+
anchors.fill: parent
17+
interactive: false
18+
orientation: Qt.Horizontal
19+
InformationPage {
20+
id: about_settings
21+
bannerActive: false
22+
bannerMargin: 0
23+
bold: true
24+
headerText: qsTr("About")
25+
headerMargin: 0
26+
description: qsTr("Bitcoin Core is an open source project.\nIf you find it useful, please contribute.\n\n This is experimental software.")
27+
descriptionMargin: 20
28+
detailActive: true
29+
detailItem: ColumnLayout {
30+
spacing: 0
31+
AboutOptions {
32+
Layout.maximumWidth: 450
33+
Layout.alignment: Qt.AlignCenter
34+
}
35+
}
36+
}
37+
SettingsDeveloper {
38+
navLeftDetail: NavButton {
39+
iconSource: "image://images/caret-left"
40+
text: qsTr("Back")
41+
onClicked: {
42+
aboutSwipe.decrementCurrentIndex()
43+
}
44+
}
2445
}
2546
}
2647
}

0 commit comments

Comments
 (0)