-
Notifications
You must be signed in to change notification settings - Fork 50
Introducing the node settings views #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright (c) 2022 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
import QtQuick.Layouts 1.15 | ||
import "../../controls" | ||
import "../../components" | ||
|
||
Page { | ||
background: null | ||
clip: true | ||
property alias navRightDetail: navbar.rightDetail | ||
header: NavigationBar { | ||
id: navbar | ||
} | ||
ColumnLayout { | ||
spacing: 0 | ||
anchors.fill: parent | ||
ColumnLayout { | ||
width: 600 | ||
spacing: 0 | ||
anchors.centerIn: parent | ||
Component.onCompleted: nodeModel.startNodeInitializionThread(); | ||
Image { | ||
Layout.alignment: Qt.AlignCenter | ||
source: "image://images/app" | ||
sourceSize.width: 64 | ||
sourceSize.height: 64 | ||
} | ||
BlockCounter { | ||
Layout.alignment: Qt.AlignCenter | ||
blockHeight: nodeModel.blockTipHeight | ||
} | ||
ProgressIndicator { | ||
width: 200 | ||
Layout.alignment: Qt.AlignCenter | ||
progress: nodeModel.verificationProgress | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
// Copyright (c) 2022 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
import QtQuick.Layouts 1.15 | ||
import "../../controls" | ||
import "../../components" | ||
import "../settings" | ||
|
||
Item { | ||
id: nodeSettings | ||
property alias navMiddleDetail: nodeSettingsView.navMiddleDetail | ||
property alias navRightDetail: nodeSettingsView.navRightDetail | ||
StackView { | ||
id: nodeSettingsView | ||
property alias navMiddleDetail: node_settings.navMiddleDetail | ||
property alias navRightDetail: node_settings.navRightDetail | ||
initialItem: Page { | ||
id: node_settings | ||
property alias navMiddleDetail: navbar.middleDetail | ||
property alias navRightDetail: navbar.rightDetail | ||
background: null | ||
header: NavigationBar { | ||
id: navbar | ||
} | ||
ColumnLayout { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like one of these ColumnLayouts can be removed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this allows for the table to expand but be a max width of 450, we use the same nested approach in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can use |
||
spacing: 0 | ||
width: parent.width | ||
ColumnLayout { | ||
spacing: 20 | ||
Layout.maximumWidth: 450 | ||
Layout.topMargin: 30 | ||
Layout.leftMargin: 20 | ||
Layout.rightMargin: 20 | ||
Layout.alignment: Qt.AlignCenter | ||
Setting { | ||
Layout.fillWidth: true | ||
header: qsTr("Dark Mode") | ||
actionItem: OptionSwitch { | ||
checked: Theme.dark | ||
onToggled: Theme.toggleDark() | ||
} | ||
} | ||
Setting { | ||
Layout.fillWidth: true | ||
header: qsTr("About") | ||
actionItem: NavButton { | ||
iconSource: "image://images/caret-right" | ||
background: null | ||
onClicked: { | ||
nodeSettingsView.push(about_page) | ||
} | ||
} | ||
} | ||
Setting { | ||
Layout.fillWidth: true | ||
header: qsTr("Storage") | ||
actionItem: NavButton { | ||
iconSource: "image://images/caret-right" | ||
background: null | ||
onClicked: { | ||
nodeSettingsView.push(storage_page) | ||
} | ||
} | ||
} | ||
Setting { | ||
Layout.fillWidth: true | ||
header: qsTr("Connection") | ||
actionItem: NavButton { | ||
iconSource: "image://images/caret-right" | ||
background: null | ||
onClicked: { | ||
nodeSettingsView.push(connection_page) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
anchors.fill: parent | ||
} | ||
Component { | ||
id: about_page | ||
SettingsAbout { | ||
navLeftDetail: NavButton { | ||
iconSource: "image://images/caret-left" | ||
text: qsTr("Back") | ||
onClicked: { | ||
nodeSettingsView.pop() | ||
} | ||
} | ||
} | ||
} | ||
Component { | ||
id: storage_page | ||
SettingsStorage { | ||
navLeftDetail: NavButton { | ||
iconSource: "image://images/caret-left" | ||
text: qsTr("Back") | ||
onClicked: { | ||
nodeSettingsView.pop() | ||
} | ||
} | ||
} | ||
} | ||
Component { | ||
id: connection_page | ||
SettingsConnection { | ||
navLeftDetail: NavButton { | ||
iconSource: "image://images/caret-left" | ||
text: qsTr("Back") | ||
onClicked: { | ||
nodeSettingsView.pop() | ||
} | ||
} | ||
} | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's another double ColumnLayout. I think we should reduce the layers here or use a different top level Item since using another Layout component isn't necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can leave it to a follow-up pr to address the nested columnlayouts throughout the code?