added swipe up for menu on PageHome
This commit is contained in:
parent
7fc4ea0c68
commit
4ab006f065
28 changed files with 90 additions and 85 deletions
|
|
@ -27,7 +27,7 @@ Item {
|
|||
if (backButtonFunction && typeof backButtonFunction === "function") {
|
||||
backButtonFunction()
|
||||
} else {
|
||||
closePage()
|
||||
PageController.closePage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ Drawer {
|
|||
|
||||
clip: true
|
||||
modal: true
|
||||
dragMargin: -10
|
||||
|
||||
enter: Transition {
|
||||
SmoothedAnimation {
|
||||
|
|
|
|||
|
|
@ -7,35 +7,15 @@ Item {
|
|||
|
||||
property StackView stackView: StackView.view
|
||||
|
||||
function goToPage(page, slide = true) {
|
||||
var pagePath = PageController.getPagePath(page)
|
||||
if (slide) {
|
||||
root.stackView.push(pagePath, { "objectName" : pagePath }, StackView.PushTransition)
|
||||
} else {
|
||||
root.stackView.push(pagePath, { "objectName" : pagePath }, StackView.Immediate)
|
||||
}
|
||||
}
|
||||
|
||||
function closePage() {
|
||||
if (root.stackView.depth <= 1) {
|
||||
return
|
||||
}
|
||||
root.stackView.pop()
|
||||
}
|
||||
|
||||
function goToStartPage() {
|
||||
while (root.stackView.depth > 1) {
|
||||
root.stackView.pop()
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
z: -1
|
||||
z: 99
|
||||
anchors.fill: parent
|
||||
|
||||
onClicked: {
|
||||
console.log("base mouse area pressed")
|
||||
focus = true
|
||||
enabled: true
|
||||
|
||||
onPressed: function(mouse) {
|
||||
forceActiveFocus()
|
||||
mouse.accepted = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue