Fix popups not being flickable by keyboard

This commit is contained in:
miruka
2021-02-28 17:05:43 -04:00
parent e45055f48c
commit e9af47e1c7
5 changed files with 14 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ HPage {
property alias flickShortcuts: flickShortcuts
property bool enableFlickShortcuts:
SwipeView ? SwipeView.isCurrentItem : true
SwipeView && SwipeView.view ? SwipeView.isCurrentItem : true
implicitWidth: theme.controls.box.defaultWidth
implicitHeight: contentHeight + implicitHeaderHeight + implicitFooterHeight

View File

@@ -6,7 +6,8 @@ import QtQuick 2.12
Shortcut {
// TODO: use enabled + a Binding with restoreValue when switch to Qt 5.15
property bool active: true
property bool disableIfAnyPopupOrMenu: true
enabled: ! window.anyPopupOrMenu && active
enabled: (! window.anyPopupOrMenu || ! disableIfAnyPopupOrMenu) && active
context: Qt.ApplicationShortcut
}