Skip to content

File tree

9 files changed

+72
-104
lines changed

9 files changed

+72
-104
lines changed

src/qml/controls/InformationPage.qml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Page {
3030
property string subtext: ""
3131
property int subtextMargin: 30
3232
property int subtextSize: 15
33+
property real maximumWidth: 600
34+
property real detailMaximumWidth: 450
3335

3436
background: null
3537
clip: true
@@ -40,7 +42,7 @@ Page {
4042

4143
ColumnLayout {
4244
id: information
43-
width: Math.min(parent.width, 600)
45+
width: Math.min(parent.width, maximumWidth)
4446
anchors.horizontalCenter: parent.horizontalCenter
4547
spacing: 0
4648
Loader {
@@ -71,10 +73,12 @@ Page {
7173
id: detail_loader
7274
active: root.detailActive
7375
visible: active
74-
Layout.fillWidth: true
76+
Layout.alignment: Qt.AlignCenter
7577
Layout.topMargin: 30
7678
Layout.leftMargin: 20
7779
Layout.rightMargin: 20
80+
Layout.fillWidth: true
81+
Layout.maximumWidth: detailMaximumWidth
7882
sourceComponent: root.detailItem
7983
}
8084
}

src/qml/pages/main.qml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ ApplicationWindow {
2929
SwipeView {
3030
id: swipeView
3131
property bool finished: false
32-
anchors.fill: parent
3332
interactive: false
3433

3534
OnboardingCover {}
@@ -47,7 +46,6 @@ ApplicationWindow {
4746
id: node
4847
SwipeView {
4948
id: node_swipe
50-
anchors.fill: parent
5149
interactive: false
5250
orientation: Qt.Vertical
5351
NodeRunner {

src/qml/pages/node/NodeRunner.qml

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,24 @@ Page {
1616
id: navbar
1717
}
1818
ColumnLayout {
19+
width: 600
1920
spacing: 0
20-
anchors.fill: parent
21-
ColumnLayout {
22-
width: 600
23-
spacing: 0
24-
anchors.centerIn: parent
25-
Component.onCompleted: nodeModel.startNodeInitializionThread();
26-
Image {
27-
Layout.alignment: Qt.AlignCenter
28-
source: "image://images/app"
29-
sourceSize.width: 64
30-
sourceSize.height: 64
31-
}
32-
BlockCounter {
33-
Layout.alignment: Qt.AlignCenter
34-
blockHeight: nodeModel.blockTipHeight
35-
}
36-
ProgressIndicator {
37-
width: 200
38-
Layout.alignment: Qt.AlignCenter
39-
progress: nodeModel.verificationProgress
40-
}
21+
anchors.centerIn: parent
22+
Component.onCompleted: nodeModel.startNodeInitializionThread();
23+
Image {
24+
Layout.alignment: Qt.AlignCenter
25+
source: "image://images/app"
26+
sourceSize.width: 64
27+
sourceSize.height: 64
28+
}
29+
BlockCounter {
30+
Layout.alignment: Qt.AlignCenter
31+
blockHeight: nodeModel.blockTipHeight
32+
}
33+
ProgressIndicator {
34+
width: 200
35+
Layout.alignment: Qt.AlignCenter
36+
progress: nodeModel.verificationProgress
4137
}
4238
}
4339
}

src/qml/pages/node/NodeSettings.qml

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,73 +13,73 @@ Item {
1313
id: nodeSettings
1414
property alias navMiddleDetail: nodeSettingsView.navMiddleDetail
1515
property alias navRightDetail: nodeSettingsView.navRightDetail
16+
1617
StackView {
1718
id: nodeSettingsView
1819
property alias navMiddleDetail: node_settings.navMiddleDetail
1920
property alias navRightDetail: node_settings.navRightDetail
21+
anchors.fill: parent
22+
2023
initialItem: Page {
2124
id: node_settings
2225
property alias navMiddleDetail: navbar.middleDetail
2326
property alias navRightDetail: navbar.rightDetail
2427
background: null
28+
implicitWidth: 450
29+
leftPadding: 20
30+
rightPadding: 20
31+
topPadding: 30
32+
2533
header: NavigationBar {
2634
id: navbar
2735
}
2836
ColumnLayout {
29-
spacing: 0
30-
width: parent.width
31-
ColumnLayout {
32-
spacing: 20
33-
Layout.maximumWidth: 450
34-
Layout.topMargin: 30
35-
Layout.leftMargin: 20
36-
Layout.rightMargin: 20
37-
Layout.alignment: Qt.AlignCenter
38-
Setting {
39-
Layout.fillWidth: true
40-
header: qsTr("Dark Mode")
41-
actionItem: OptionSwitch {
42-
checked: Theme.dark
43-
onToggled: Theme.toggleDark()
44-
}
37+
spacing: 20
38+
width: Math.min(parent.width, 450)
39+
anchors.horizontalCenter: parent.horizontalCenter
40+
Setting {
41+
Layout.fillWidth: true
42+
header: qsTr("Dark Mode")
43+
actionItem: OptionSwitch {
44+
checked: Theme.dark
45+
onToggled: Theme.toggleDark()
4546
}
46-
Setting {
47-
Layout.fillWidth: true
48-
header: qsTr("About")
49-
actionItem: NavButton {
50-
iconSource: "image://images/caret-right"
51-
background: null
52-
onClicked: {
53-
nodeSettingsView.push(about_page)
54-
}
47+
}
48+
Setting {
49+
Layout.fillWidth: true
50+
header: qsTr("About")
51+
actionItem: NavButton {
52+
iconSource: "image://images/caret-right"
53+
background: null
54+
onClicked: {
55+
nodeSettingsView.push(about_page)
5556
}
5657
}
57-
Setting {
58-
Layout.fillWidth: true
59-
header: qsTr("Storage")
60-
actionItem: NavButton {
61-
iconSource: "image://images/caret-right"
62-
background: null
63-
onClicked: {
64-
nodeSettingsView.push(storage_page)
65-
}
58+
}
59+
Setting {
60+
Layout.fillWidth: true
61+
header: qsTr("Storage")
62+
actionItem: NavButton {
63+
iconSource: "image://images/caret-right"
64+
background: null
65+
onClicked: {
66+
nodeSettingsView.push(storage_page)
6667
}
6768
}
68-
Setting {
69-
Layout.fillWidth: true
70-
header: qsTr("Connection")
71-
actionItem: NavButton {
72-
iconSource: "image://images/caret-right"
73-
background: null
74-
onClicked: {
75-
nodeSettingsView.push(connection_page)
76-
}
69+
}
70+
Setting {
71+
Layout.fillWidth: true
72+
header: qsTr("Connection")
73+
actionItem: NavButton {
74+
iconSource: "image://images/caret-right"
75+
background: null
76+
onClicked: {
77+
nodeSettingsView.push(connection_page)
7778
}
7879
}
7980
}
8081
}
8182
}
82-
anchors.fill: parent
8383
}
8484
Component {
8585
id: about_page

src/qml/pages/onboarding/OnboardingStorageLocation.qml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ InformationPage {
2222
description: qsTr("Where do you want to store the downloaded block data?")
2323
descriptionMargin: 20
2424
detailActive: true
25-
detailItem: ColumnLayout {
26-
spacing: 0
27-
StorageLocations {
28-
Layout.maximumWidth: 450
29-
Layout.alignment: Qt.AlignCenter
30-
}
31-
}
25+
detailItem: StorageLocations {}
3226
buttonText: qsTr("Next")
3327
}

src/qml/pages/settings/SettingsAbout.qml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,7 @@ Item {
2626
description: qsTr("Bitcoin Core is an open source project.\nIf you find it useful, please contribute.\n\n This is experimental software.")
2727
descriptionMargin: 20
2828
detailActive: true
29-
detailItem: ColumnLayout {
30-
spacing: 0
31-
AboutOptions {
32-
Layout.maximumWidth: 450
33-
Layout.alignment: Qt.AlignCenter
34-
}
35-
}
29+
detailItem: AboutOptions {}
3630
}
3731
SettingsDeveloper {
3832
navLeftDetail: NavButton {

src/qml/pages/settings/SettingsConnection.qml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,5 @@ InformationPage {
1616
headerText: qsTr("Connection settings")
1717
headerMargin: 0
1818
detailActive: true
19-
detailItem: ColumnLayout {
20-
spacing: 0
21-
ConnectionSettings {
22-
Layout.maximumWidth: 450
23-
Layout.alignment: Qt.AlignCenter
24-
}
25-
}
19+
detailItem: ConnectionSettings {}
2620
}

src/qml/pages/settings/SettingsDeveloper.qml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,5 @@ InformationPage {
1414
headerText: qsTr("Developer options")
1515
headerMargin: 0
1616
detailActive: true
17-
detailItem: ColumnLayout {
18-
spacing: 0
19-
DeveloperOptions {
20-
Layout.maximumWidth: 450
21-
Layout.alignment: Qt.AlignCenter
22-
}
23-
}
17+
detailItem: DeveloperOptions {}
2418
}

src/qml/pages/settings/SettingsStorage.qml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,5 @@ InformationPage {
1414
headerText: qsTr("Storage settings")
1515
headerMargin: 0
1616
detailActive: true
17-
detailItem: ColumnLayout {
18-
spacing: 0
19-
StorageSettings {
20-
Layout.maximumWidth: 450
21-
Layout.alignment: Qt.AlignCenter
22-
}
23-
}
17+
detailItem: StorageSettings {}
2418
}

0 commit comments

Comments
 (0)