Skip to content

Commit

Permalink
qml: use NavigationBar2 in NodeSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
promag committed Sep 12, 2023
1 parent 3881dbc commit 06ac24e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
10 changes: 2 additions & 8 deletions src/qml/pages/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,8 @@ ApplicationWindow {
}
}
NodeSettings {
navMiddleDetail: Header {
headerBold: true
headerSize: 18
header: "Settings"
}
navRightDetail: NavButton {
text: qsTr("Done")
onClicked: node_swipe.decrementCurrentIndex()
onDoneClicked: {
node_swipe.decrementCurrentIndex()
}
}
}
Expand Down
22 changes: 13 additions & 9 deletions src/qml/pages/node/NodeSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,32 @@ import "../../components"
import "../settings"

Item {
id: nodeSettings
property alias navMiddleDetail: nodeSettingsView.navMiddleDetail
property alias navRightDetail: nodeSettingsView.navRightDetail
signal doneClicked

id: root

StackView {
id: nodeSettingsView
property alias navMiddleDetail: node_settings.navMiddleDetail
property alias navRightDetail: node_settings.navRightDetail
anchors.fill: parent

initialItem: Page {
id: node_settings
property alias navMiddleDetail: navbar.middleDetail
property alias navRightDetail: navbar.rightDetail
background: null
implicitWidth: 450
leftPadding: 20
rightPadding: 20
topPadding: 30

header: NavigationBar {
id: navbar
header: NavigationBar2 {
centerItem: Header {
headerBold: true
headerSize: 18
header: "Settings"
}
rightItem: NavButton {
text: qsTr("Done")
onClicked: root.doneClicked()
}
}
ColumnLayout {
spacing: 4
Expand Down

0 comments on commit 06ac24e

Please sign in to comment.