2022-05-10 20:10:34 +00:00
|
|
|
import QtQuick
|
|
|
|
|
|
|
|
/*!
|
|
|
|
*/
|
|
|
|
Item {
|
|
|
|
required property Window window;
|
|
|
|
property alias enableHideWindow: hideWindowShortcut.enabled
|
|
|
|
|
|
|
|
Shortcut {
|
2022-08-10 10:08:21 +00:00
|
|
|
sequences: [StandardKey.FullScreen]
|
2022-05-10 20:10:34 +00:00
|
|
|
onActivated: {
|
|
|
|
if (visibility === Window.FullScreen)
|
|
|
|
window.showNormal()
|
|
|
|
else
|
|
|
|
window.showFullScreen()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Shortcut {
|
|
|
|
sequence: "Ctrl+M"
|
|
|
|
onActivated: {
|
|
|
|
if (visibility === Window.Minimized)
|
|
|
|
window.showNormal()
|
|
|
|
else
|
|
|
|
window.showMinimized()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Shortcut {
|
|
|
|
id: hideWindowShortcut
|
|
|
|
sequences: [StandardKey.Close]
|
|
|
|
onActivated: window.visible = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
Shortcut {
|
|
|
|
sequence: StandardKey.Quit
|
|
|
|
onActivated: Qt.quit()
|
|
|
|
}
|
|
|
|
}
|