From 71d7a95e4a220dd211e49a08c847cebe2857bd81 Mon Sep 17 00:00:00 2001 From: Anatasof Wirapraja Date: Wed, 18 Sep 2019 17:25:13 +0700 Subject: remove `header` on `main.qml` --- main.qml | 86 +++++++++++++++++++--------------------------------------------- 1 file changed, 25 insertions(+), 61 deletions(-) (limited to 'main.qml') diff --git a/main.qml b/main.qml index b4632e1..b0bb8a9 100644 --- a/main.qml +++ b/main.qml @@ -12,76 +12,40 @@ ApplicationWindow { title: { text: qsTr("kelakon") } - header: - ToolBar { - background: Rectangle { - color: "#FAFFFFFF" - } - RowLayout { - ToolButton { - id: toolButton - icon.name: "menu-button" - icon.source: "components/icons/menu-24px.svg" - highlighted: true - onClicked: { - if (contentView.depth > 1) { - contentView.pop() - } else { - drawer.open() - } - } - } - Label { - text: contentView.currentItem.title - font.family: "Work Sans" - font.weight: Font.Medium - font.pointSize: 20 - wrapMode: Text.WordWrap - elide: Label.ElideRight - horizontalAlignment: Qt.AlignHCenter - verticalAlignment: Qt.AlignVCenter - } - } - } + StackView { + id: pageView + anchors.fill: parent + initialItem: Onboarding {} - Drawer { - id: drawer - width: window.width * 0.8 - height: window.height - visible: false + Drawer { + id: drawer + width: window.width * 0.8 + height: window.height + visible: false - Column { - anchors.fill: parent + Column { + anchors.fill: parent - ItemDelegate { - text: qsTr("Page 1") - width: parent.width - onClicked: { - contentView.push("Page1Form.ui.qml") - drawer.close() + ItemDelegate { + text: qsTr("Page 1") + width: parent.width + onClicked: { + pageView.push("Page1Form.ui.qml") + drawer.close() + } } - } - ItemDelegate { - text: qsTr("Page 2") - width: parent.width - onClicked: { - contentView.push("Page2Form.ui.qml") - drawer.close() + ItemDelegate { + text: qsTr("Page 2") + width: parent.width + onClicked: { + pageView.push("Page2Form.ui.qml") + drawer.close() + } } } } } - StackView { - id: contentView - initialItem: Onboarding { - - } - - anchors.fill: parent - - - } } -- cgit v1.2.3