update transitions

This commit is contained in:
Cyril Anisimov 2024-09-29 23:50:58 +02:00
parent b4f4ec4ac9
commit 3c655d0051
6 changed files with 10 additions and 23 deletions

View file

@ -37,11 +37,11 @@ DrawerType2 {
target: root
enabled: !GC.isMobile()
function onOpened() {
FocusController.setRootItem(root)
FocusController.pushRootObject(root)
}
function onClosed() {
FocusController.setRootItem(null)
FocusController.dropRootObject(root)
}
}

View file

@ -24,11 +24,11 @@ DrawerType2 {
target: root
enabled: !GC.isMobile()
function onOpened() {
FocusController.setRootItem(root)
FocusController.pushRootObject(root)
}
function onClosed() {
FocusController.setRootItem(null)
FocusController.dropRootObject(root)
}
}

View file

@ -95,7 +95,7 @@ Item {
depthIndex = 0
PageController.decrementDrawerDepth()
FocusController.setRootItem(null)
FocusController.dropRootObject(root)
}
function onOpenTriggered() {
@ -118,7 +118,7 @@ Item {
}
depthIndex = PageController.incrementDrawerDepth()
FocusController.setRootItem(root)
FocusController.pushRootObject(root)
}
}

View file

@ -15,25 +15,13 @@ Item {
}
}
// MouseArea {
// id: globalMouseArea
// z: 99
// anchors.fill: parent
// enabled: true
// onPressed: function(mouse) {
// forceActiveFocus()
// mouse.accepted = false
// }
// }
// Set a timer to set focus after a short delay
Timer {
id: timer
interval: 500 // Milliseconds
onTriggered: {
FocusController.resetFocus()
FocusController.resetRootObject()
FocusController.setFocusOnDefaultItem()
}
repeat: false // Stop the timer after one trigger
running: !GC.isMobile() // Start the timer

View file

@ -28,11 +28,11 @@ Popup {
}
onOpened: {
FocusController.setRootItem(root)
FocusController.pushRootObject(root)
}
onClosed: {
FocusController.setRootItem(null)
FocusController.dropRootObject(root)
}
background: Rectangle {

View file

@ -299,7 +299,6 @@ PageType {
tabBarStackView.goToTabBarPage(PageEnum.PageHome)
ServersModel.processedIndex = ServersModel.defaultIndex
tabBar.currentIndex = 0
FocusController.setRootItem(null) // TODO: move to do it automaticaly
}
}