forked from Siecje/qml-material-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PageStackDemo.qml
91 lines (69 loc) · 2.08 KB
/
PageStackDemo.qml
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
88
89
90
91
import QtQuick 2.4
import Material 0.2
import Material.Extras 0.1
Item {
Column {
anchors.centerIn: parent
spacing: dp(20)
Button {
anchors.horizontalCenter: parent.horizontalCenter
text: "Push subpage"
elevation: 1
onClicked: pageStack.push(Qt.resolvedUrl("SubPage.qml"))
}
Button {
anchors.horizontalCenter: parent.horizontalCenter
text: "Push subpage with sidebar"
elevation: 1
onClicked: pageStack.push(Qt.resolvedUrl("SidebarPage.qml"))
}
Image {
id: image
anchors.horizontalCenter: parent.horizontalCenter
source: Qt.resolvedUrl("images/balloon.jpg")
width: dp(400)
height: dp(250)
Ink {
anchors.fill: parent
onClicked: overlayView.open(image)
}
}
Label {
anchors.horizontalCenter: parent.horizontalCenter
style: "subheading"
color: Theme.light.subTextColor
text: "Tap to edit picture"
font.italic: true
}
}
OverlayView {
id: overlayView
width: dp(800)
height: dp(500)
Image {
id: contentImage
source: Qt.resolvedUrl("images/balloon.jpg")
anchors.fill: parent
}
Row {
anchors {
top: parent.top
right: parent.right
rightMargin: dp(16)
}
height: dp(48)
opacity: overlayView.transitionOpacity
spacing: dp(24)
Repeater {
model: ["content/add", "image/edit", "action/delete"]
delegate: IconButton {
id: iconAction
iconName: modelData
color: Theme.dark.iconColor
size: iconName == "content/add" ? dp(27) : dp(24)
anchors.verticalCenter: parent.verticalCenter
}
}
}
}
}