Fix QuickSwitcher activation
By making sure the global menu bar is disabled when not needed. This should also help with memory usage. Fix #482
This commit is contained in:
@@ -11,6 +11,12 @@ import org.kde.neochat 1.0
|
|||||||
QQC2.Popup {
|
QQC2.Popup {
|
||||||
id: _popup
|
id: _popup
|
||||||
|
|
||||||
|
Shortcut {
|
||||||
|
sequence: "Ctrl+K"
|
||||||
|
enabled: !Kirigami.Settings.hasPlatformMenuBar
|
||||||
|
onActivated: _popup.open()
|
||||||
|
}
|
||||||
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if (!visible) {
|
if (!visible) {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ Kirigami.ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
active: !Kirigami.Settings.isMobile
|
active: Kirigami.Settings.hasPlatformMenuBar && !Kirigami.Settings.isMobile
|
||||||
source: Qt.resolvedUrl("qrc:/imports/NeoChat/Menu/GlobalMenu.qml")
|
source: Qt.resolvedUrl("qrc:/imports/NeoChat/Menu/GlobalMenu.qml")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,16 +66,9 @@ Kirigami.ApplicationWindow {
|
|||||||
function onYChanged() { saveWindowGeometryTimer.restart(); }
|
function onYChanged() { saveWindowGeometryTimer.restart(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
Shortcut {
|
|
||||||
sequence: "Ctrl+K"
|
|
||||||
onActivated: {
|
|
||||||
quickView.item.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: quickView
|
id: quickView
|
||||||
|
|
||||||
active: !Kirigami.Settings.isMobile
|
active: !Kirigami.Settings.isMobile
|
||||||
sourceComponent: QuickSwitcher { }
|
sourceComponent: QuickSwitcher { }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user