added swipe up for menu on PageHome

This commit is contained in:
vladimir.kuznetsov 2023-09-06 13:37:37 +05:00
parent 7fc4ea0c68
commit 4ab006f065
28 changed files with 90 additions and 85 deletions

View file

@ -27,7 +27,7 @@ Item {
if (backButtonFunction && typeof backButtonFunction === "function") {
backButtonFunction()
} else {
closePage()
PageController.closePage()
}
}
}

View file

@ -6,6 +6,7 @@ Drawer {
clip: true
modal: true
dragMargin: -10
enter: Transition {
SmoothedAnimation {

View file

@ -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
}
}
}