2020-09-23 19:57:54 -04:00
|
|
|
// Copyright Mirage authors & contributors <https://github.com/mirukana/mirage>
|
2019-12-19 07:46:16 -04:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
2019-08-22 13:03:26 -04:00
|
|
|
import QtQuick 2.12
|
|
|
|
|
2019-12-08 12:42:40 -04:00
|
|
|
Shortcut {
|
2020-04-01 08:01:13 -04:00
|
|
|
// TODO: use enabled + a Binding with restoreValue when switch to Qt 5.15
|
|
|
|
property bool active: true
|
2021-02-28 17:05:43 -04:00
|
|
|
property bool disableIfAnyPopupOrMenu: true
|
2020-07-12 00:25:57 -04:00
|
|
|
|
2021-02-28 17:05:43 -04:00
|
|
|
enabled: (! window.anyPopupOrMenu || ! disableIfAnyPopupOrMenu) && active
|
2020-07-12 00:25:57 -04:00
|
|
|
context: Qt.ApplicationShortcut
|
2019-08-22 13:03:26 -04:00
|
|
|
}
|