blob: b4632e1aa27380d1ed362089ab47360a9bd12838 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import QtQuick.Layouts 1.12
import "features"
ApplicationWindow {
id: window
visible: true
width: 360
height: 640
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
}
}
}
Drawer {
id: drawer
width: window.width * 0.8
height: window.height
visible: false
Column {
anchors.fill: parent
ItemDelegate {
text: qsTr("Page 1")
width: parent.width
onClicked: {
contentView.push("Page1Form.ui.qml")
drawer.close()
}
}
ItemDelegate {
text: qsTr("Page 2")
width: parent.width
onClicked: {
contentView.push("Page2Form.ui.qml")
drawer.close()
}
}
}
}
StackView {
id: contentView
initialItem: Onboarding {
}
anchors.fill: parent
}
}
|