clean up round 1

This commit is contained in:
Dante Ruiz 2017-01-06 23:25:25 +00:00
parent 6c51edec77
commit 6705846518
2 changed files with 1 additions and 28 deletions

View file

@ -465,32 +465,7 @@ FocusScope {
Component { id: fileDialogBuilder; FileDialog { } }
function fileDialog(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() {
// First find the active focus item, and unfocus it, all the way

View file

@ -538,8 +538,6 @@ void OffscreenUi::unfocusWindows() {
}
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));
}