Merge branch 'feature/new-gui' into fixbug/not_hide_topright_corner_button
This commit is contained in:
commit
81b77c9688
48 changed files with 2309 additions and 79 deletions
|
|
@ -2,7 +2,9 @@ import QtQuick
|
|||
import QtQuick.Controls
|
||||
|
||||
Drawer {
|
||||
id: drawer
|
||||
property bool needCloseButton: true
|
||||
property bool isOpened: false
|
||||
|
||||
Connections {
|
||||
target: PageController
|
||||
|
|
@ -51,12 +53,16 @@ Drawer {
|
|||
}
|
||||
|
||||
onOpened: {
|
||||
isOpened = true
|
||||
|
||||
if (needCloseButton) {
|
||||
PageController.drawerOpen()
|
||||
}
|
||||
}
|
||||
|
||||
onClosed: {
|
||||
isOpened = false
|
||||
|
||||
if (needCloseButton) {
|
||||
PageController.drawerClose()
|
||||
}
|
||||
|
|
@ -66,4 +72,27 @@ Drawer {
|
|||
PageController.updateNavigationBarColor(initialPageNavigationBarColor)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onPositionChanged: {
|
||||
if (isOpened && (position <= 0.99 && position >= 0.95)) {
|
||||
mouseArea.canceled()
|
||||
drawer.close()
|
||||
mouseArea.exited()
|
||||
dropArea.exited()
|
||||
}
|
||||
}
|
||||
|
||||
DropArea {
|
||||
id: dropArea
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
|
||||
onPressed: {
|
||||
isOpened = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue