mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 14:52:46 +02:00
clean up round 1
This commit is contained in:
parent
6c51edec77
commit
6705846518
2 changed files with 1 additions and 28 deletions
|
@ -465,32 +465,7 @@ FocusScope {
|
||||||
Component { id: fileDialogBuilder; FileDialog { } }
|
Component { id: fileDialogBuilder; FileDialog { } }
|
||||||
function fileDialog(properties) {
|
function fileDialog(properties) {
|
||||||
return fileDialogBuilder.createObject(desktop, properties);
|
return fileDialogBuilder.createObject(desktop, properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuMouseHandler { id: menuPopperUpper }
|
|
||||||
function popupMenu(point) {
|
|
||||||
menuPopperUpper.popup(desktop, rootMenu.items, point);
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleMenu(point) {
|
|
||||||
menuPopperUpper.toggle(desktop, rootMenu.items, point);
|
|
||||||
}
|
|
||||||
|
|
||||||
Keys.onEscapePressed: {
|
|
||||||
if (menuPopperUpper.closeLastMenu()) {
|
|
||||||
event.accepted = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
event.accepted = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Keys.onLeftPressed: {
|
|
||||||
if (menuPopperUpper.closeLastMenu()) {
|
|
||||||
event.accepted = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
event.accepted = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function unfocusWindows() {
|
function unfocusWindows() {
|
||||||
// First find the active focus item, and unfocus it, all the way
|
// First find the active focus item, and unfocus it, all the way
|
||||||
|
|
|
@ -538,8 +538,6 @@ void OffscreenUi::unfocusWindows() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffscreenUi::toggleMenu(const QPoint& screenPosition) { // caller should already have mapped using getReticlePosition
|
void OffscreenUi::toggleMenu(const QPoint& screenPosition) { // caller should already have mapped using getReticlePosition
|
||||||
emit showDesktop(); // we really only want to do this if you're showing the menu, but for now this works
|
|
||||||
QMetaObject::invokeMethod(_desktop, "toggleMenu", Q_ARG(QVariant, screenPosition));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue