Skip to content

Commit 846a955

Browse files
committed
qml: condense onboarding view pages
Condenses subpages into the main page for an onboarding view.
1 parent 8beb431 commit 846a955

12 files changed

+236
-344
lines changed

src/Makefile.qt.include

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -333,18 +333,11 @@ QML_RES_QML = \
333333
qml/controls/Wizard.qml \
334334
qml/pages/initerrormessage.qml \
335335
qml/pages/onboarding/onboarding01.qml \
336-
qml/pages/onboarding/onboarding01a.qml \
337-
qml/pages/onboarding/onboarding01b.qml \
338-
qml/pages/onboarding/onboarding01c.qml \
339336
qml/pages/onboarding/onboarding02.qml \
340337
qml/pages/onboarding/onboarding03.qml \
341338
qml/pages/onboarding/onboarding04.qml \
342339
qml/pages/onboarding/onboarding05.qml \
343-
qml/pages/onboarding/onboarding05a.qml \
344-
qml/pages/onboarding/onboarding05b.qml \
345340
qml/pages/onboarding/onboarding06.qml \
346-
qml/pages/onboarding/onboarding06a.qml \
347-
qml/pages/onboarding/onboarding06b.qml \
348341
qml/pages/stub.qml
349342

350343
BITCOIN_QT_CPP = $(BITCOIN_QT_BASE_CPP)

src/qml/bitcoin_qml.qrc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,11 @@
2626
<file>controls/Wizard.qml</file>
2727
<file>pages/initerrormessage.qml</file>
2828
<file>pages/onboarding/onboarding01.qml</file>
29-
<file>pages/onboarding/onboarding01a.qml</file>
30-
<file>pages/onboarding/onboarding01b.qml</file>
31-
<file>pages/onboarding/onboarding01c.qml</file>
3229
<file>pages/onboarding/onboarding02.qml</file>
3330
<file>pages/onboarding/onboarding03.qml</file>
3431
<file>pages/onboarding/onboarding04.qml</file>
3532
<file>pages/onboarding/onboarding05.qml</file>
36-
<file>pages/onboarding/onboarding05a.qml</file>
37-
<file>pages/onboarding/onboarding05b.qml</file>
3833
<file>pages/onboarding/onboarding06.qml</file>
39-
<file>pages/onboarding/onboarding06a.qml</file>
40-
<file>pages/onboarding/onboarding06b.qml</file>
4134
<file>pages/stub.qml</file>
4235
</qresource>
4336
<qresource prefix="/icons">

src/qml/pages/onboarding/onboarding01.qml

Lines changed: 92 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,100 @@ Page {
1717
anchors.fill: parent
1818
interactive: false
1919
orientation: Qt.Horizontal
20-
Loader {
21-
source:"onboarding01a.qml"
20+
Page {
21+
background: null
22+
clip: true
23+
Layout.fillWidth: true
24+
header: OnboardingNav {
25+
alignLeft: false
26+
navButton: NavButton {
27+
iconSource: "image://images/info"
28+
iconHeight: 24
29+
onClicked: {
30+
introductions.incrementCurrentIndex()
31+
swipeView.inSubPage = true
32+
}
33+
}
34+
}
35+
OnboardingInfo {
36+
width: 600
37+
anchors.top: parent.top
38+
anchors.horizontalCenter: parent.horizontalCenter
39+
banner: Image {
40+
Layout.fillWidth: true
41+
Layout.alignment: Qt.AlignCenter
42+
source: "image://images/app"
43+
sourceSize.width: 100
44+
sourceSize.height: 100
45+
}
46+
bold: true
47+
header: qsTr("Bitcoin Core App")
48+
headerSize: 36
49+
description: qsTr("Be part of the Bitcoin network.")
50+
descriptionSize: 24
51+
subtext: qsTr("100% open-source & open-design")
52+
buttonText: "Start"
53+
}
2254
}
23-
Loader {
24-
source:"onboarding01b.qml"
55+
Page {
56+
background: null
57+
clip: true
58+
Layout.fillWidth: true
59+
header: OnboardingNav {
60+
navButton: NavButton {
61+
iconSource: "image://images/caret-left"
62+
text: "Back"
63+
onClicked: {
64+
introductions.decrementCurrentIndex()
65+
swipeView.inSubPage = false
66+
}
67+
}
68+
}
69+
ColumnLayout {
70+
width: 600
71+
spacing: 0
72+
anchors.top: parent.top
73+
anchors.horizontalCenter: parent.horizontalCenter
74+
Header {
75+
Layout.fillWidth: true
76+
bold: true
77+
header: "About"
78+
description: qsTr("Bitcoin Core is an open source project.\nIf you find it useful, please contribute.\n\n This is experimental software.")
79+
descriptionMargin: 20
80+
}
81+
AboutOptions {
82+
Layout.topMargin: 30
83+
}
84+
}
2585
}
26-
Loader {
27-
source:"onboarding01c.qml"
86+
Page {
87+
background: null
88+
clip: true
89+
Layout.fillWidth: true
90+
header: OnboardingNav {
91+
navButton: NavButton {
92+
iconSource: "image://images/caret-left"
93+
text: "Back"
94+
onClicked: {
95+
introductions.decrementCurrentIndex()
96+
swipeView.inSubPage = true
97+
}
98+
}
99+
}
100+
ColumnLayout {
101+
width: 600
102+
spacing: 0
103+
anchors.top: parent.top
104+
anchors.horizontalCenter: parent.horizontalCenter
105+
Header {
106+
Layout.fillWidth: true
107+
bold: true
108+
header: "Developer options"
109+
}
110+
DeveloperOptions {
111+
Layout.topMargin: 30
112+
}
113+
}
28114
}
29115
}
30116
}

src/qml/pages/onboarding/onboarding01a.qml

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/qml/pages/onboarding/onboarding01b.qml

Lines changed: 0 additions & 41 deletions
This file was deleted.

src/qml/pages/onboarding/onboarding01c.qml

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/qml/pages/onboarding/onboarding05.qml

Lines changed: 72 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,79 @@ Page {
1717
anchors.fill: parent
1818
interactive: false
1919
orientation: Qt.Vertical
20-
Loader {
21-
source:"onboarding05a.qml"
20+
Page {
21+
background: null
22+
Layout.fillWidth: true
23+
clip: true
24+
header: OnboardingNav {
25+
navButton: NavButton {
26+
iconSource: "image://images/caret-left"
27+
text: "Back"
28+
onClicked: swipeView.currentIndex -= 1
29+
}
30+
}
31+
ColumnLayout {
32+
width: 600
33+
spacing: 0
34+
anchors.top: parent.top
35+
anchors.horizontalCenter: parent.horizontalCenter
36+
Header {
37+
Layout.fillWidth: true
38+
bold: true
39+
header: qsTr("Storage")
40+
description: qsTr("Data retrieved from the Bitcoin network is stored\non your device.\n\nYou have 500GB of storage available.")
41+
}
42+
StorageOptions {
43+
Layout.topMargin: 30
44+
Layout.alignment: Qt.AlignCenter
45+
}
46+
TextButton {
47+
Layout.alignment: Qt.AlignCenter
48+
Layout.topMargin: 30
49+
text: "Detailed settings"
50+
textSize: 18
51+
textColor: "#F7931A"
52+
onClicked: {
53+
storages.incrementCurrentIndex()
54+
swipeView.inSubPage = true
55+
}
56+
}
57+
ContinueButton {
58+
Layout.alignment: Qt.AlignCenter
59+
Layout.topMargin: 40
60+
text: "Next"
61+
onClicked: swipeView.incrementCurrentIndex()
62+
}
63+
}
2264
}
23-
Loader {
24-
source:"onboarding05b.qml"
65+
Page {
66+
background: null
67+
Layout.fillWidth: true
68+
clip: true
69+
header: OnboardingNav {
70+
alignLeft: false
71+
navButton: NavButton {
72+
text: "Done"
73+
onClicked: {
74+
storages.decrementCurrentIndex()
75+
swipeView.inSubPage = false
76+
}
77+
}
78+
}
79+
ColumnLayout {
80+
width: 450
81+
spacing: 0
82+
anchors.top: parent.top
83+
anchors.horizontalCenter: parent.horizontalCenter
84+
Header {
85+
Layout.fillWidth: true
86+
bold: true
87+
header: "Storage settings"
88+
}
89+
StorageSettings {
90+
Layout.topMargin: 30
91+
}
92+
}
2593
}
2694
}
2795
}

0 commit comments

Comments
 (0)