Skip to content

Commit 177e47e

Browse files
committed
qml: condense onboarding view pages
Condenses subpages into the main page for an onboarding view.
1 parent 63f2e2f commit 177e47e

12 files changed

+239
-343
lines changed

src/Makefile.qt.include

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -330,18 +330,11 @@ QML_RES_QML = \
330330
qml/controls/Wizard.qml \
331331
qml/pages/initerrormessage.qml \
332332
qml/pages/onboarding/onboarding01.qml \
333-
qml/pages/onboarding/onboarding01a.qml \
334-
qml/pages/onboarding/onboarding01b.qml \
335-
qml/pages/onboarding/onboarding01c.qml \
336333
qml/pages/onboarding/onboarding02.qml \
337334
qml/pages/onboarding/onboarding03.qml \
338335
qml/pages/onboarding/onboarding04.qml \
339336
qml/pages/onboarding/onboarding05.qml \
340-
qml/pages/onboarding/onboarding05a.qml \
341-
qml/pages/onboarding/onboarding05b.qml \
342337
qml/pages/onboarding/onboarding06.qml \
343-
qml/pages/onboarding/onboarding06a.qml \
344-
qml/pages/onboarding/onboarding06b.qml \
345338
qml/pages/stub.qml
346339

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

src/qml/pages/onboarding/onboarding01a.qml

Lines changed: 0 additions & 47 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)