Skip to content

Commit 847ba98

Browse files
Johnny Carlsonhebasto
authored andcommitted
qml: contain oboarding information in a scroll view
Github-Pull: #194 Rebased-From: ecd1409
1 parent 3d49006 commit 847ba98

File tree

1 file changed

+61
-52
lines changed

1 file changed

+61
-52
lines changed

src/qml/BitcoinApp/Controls/InformationPage.qml

Lines changed: 61 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -40,61 +40,70 @@ Page {
4040
id: navbar
4141
}
4242

43-
ColumnLayout {
44-
id: information
45-
width: Math.min(parent.width, maximumWidth)
46-
anchors.horizontalCenter: parent.horizontalCenter
47-
spacing: 0
48-
Loader {
49-
id: banner_loader
50-
active: root.bannerActive
51-
visible: active
52-
Layout.alignment: Qt.AlignCenter
53-
Layout.topMargin: root.bannerMargin
54-
sourceComponent: root.bannerItem
55-
}
56-
Header {
57-
Layout.fillWidth: true
58-
Layout.leftMargin: 20
59-
Layout.rightMargin: 20
60-
bold: root.bold
61-
center: root.center
62-
header: root.headerText
63-
headerMargin: root.headerMargin
64-
headerSize: root.headerSize
65-
description: root.description
66-
descriptionMargin: root.descriptionMargin
67-
descriptionSize: root.descriptionSize
68-
subtext: root.subtext
69-
subtextMargin: root.subtextMargin
70-
subtextSize: root.subtextSize
43+
ScrollView {
44+
width: parent.width
45+
height: parent.height
46+
clip: true
47+
contentWidth: width
48+
contentHeight: information.height + continueButton.height
49+
+ continueButton.anchors.topMargin + continueButton.anchors.bottomMargin
50+
51+
ColumnLayout {
52+
id: information
53+
width: Math.min(parent.width, 600)
54+
anchors.horizontalCenter: parent.horizontalCenter
55+
spacing: 0
56+
Loader {
57+
id: banner_loader
58+
active: root.bannerActive
59+
visible: active
60+
Layout.alignment: Qt.AlignCenter
61+
Layout.topMargin: root.bannerMargin
62+
sourceComponent: root.bannerItem
63+
}
64+
Header {
65+
Layout.fillWidth: true
66+
Layout.leftMargin: 20
67+
Layout.rightMargin: 20
68+
bold: root.bold
69+
center: root.center
70+
header: root.headerText
71+
headerMargin: root.headerMargin
72+
headerSize: root.headerSize
73+
description: root.description
74+
descriptionMargin: root.descriptionMargin
75+
descriptionSize: root.descriptionSize
76+
subtext: root.subtext
77+
subtextMargin: root.subtextMargin
78+
subtextSize: root.subtextSize
79+
}
80+
Loader {
81+
id: detail_loader
82+
active: root.detailActive
83+
visible: active
84+
Layout.fillWidth: true
85+
Layout.alignment: Qt.AlignCenter
86+
Layout.topMargin: 30
87+
Layout.leftMargin: 20
88+
Layout.rightMargin: 20
89+
Layout.maximumWidth: detailMaximumWidth
90+
sourceComponent: root.detailItem
91+
}
7192
}
72-
Loader {
73-
id: detail_loader
74-
active: root.detailActive
75-
visible: active
76-
Layout.alignment: Qt.AlignCenter
77-
Layout.topMargin: 30
78-
Layout.leftMargin: 20
79-
Layout.rightMargin: 20
80-
Layout.fillWidth: true
81-
Layout.maximumWidth: detailMaximumWidth
82-
sourceComponent: root.detailItem
93+
ContinueButton {
94+
id: continueButton
95+
visible: root.buttonText.length > 0
96+
enabled: visible
97+
width: Math.min(300, parent.width - 2 * anchors.leftMargin)
98+
anchors.topMargin: 40
99+
anchors.bottomMargin: 60
100+
anchors.leftMargin: 20
101+
anchors.rightMargin: 20
102+
anchors.horizontalCenter: parent.horizontalCenter
103+
text: root.buttonText
104+
onClicked: root.lastPage ? swipeView.finished = true : swipeView.incrementCurrentIndex()
83105
}
84106
}
85-
ContinueButton {
86-
id: continueButton
87-
visible: root.buttonText.length > 0
88-
enabled: visible
89-
width: Math.min(300, parent.width - 2 * anchors.leftMargin)
90-
anchors.topMargin: 40
91-
anchors.bottomMargin: 60
92-
anchors.leftMargin: 20
93-
anchors.rightMargin: 20
94-
anchors.horizontalCenter: parent.horizontalCenter
95-
text: root.buttonText
96-
onClicked: root.lastPage ? swipeView.finished = true : swipeView.incrementCurrentIndex()
97-
}
98107

99108
state: AppMode.state
100109

0 commit comments

Comments
 (0)