From c7153e070ecab6fb65c5de40143f8c4cc41eb0de Mon Sep 17 00:00:00 2001 From: Jeena Date: Sat, 29 Oct 2016 08:09:20 +0200 Subject: [PATCH] Make the MenuBar show- and hidebar Untill now the MenuBar was not visible untill you pressed the alt-key, which made it visible. Sadly after that it was not possible to hide it again. This patch fixes that. --- qml/main.qml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/qml/main.qml b/qml/main.qml index 0a6288a..d1e162a 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -47,6 +47,18 @@ ApplicationWindow { property int textFontSizeIndex: defaultTextFontSizeIndex property int textFontSize: fontSizes[textFontSizeIndex] property bool nightmode: false + property bool showMenuBar: false + + menuBar: TheMenuBar { + id: menu + serverLogin: serverLogin + server: server + sidebar: sidebar + content: content + visible: app.showMenuBar + __contentItem.visible: visible + } + Settings { id: settings @@ -60,14 +72,6 @@ ApplicationWindow { property alias nightmode: app.nightmode } - property TheMenuBar menu: TheMenuBar { - id: menu - serverLogin: serverLogin - server: server - sidebar: sidebar - content: content - } - function loggedIn() { if(serverLogin.loggedIn()) { menu.loggedIn = true; @@ -192,7 +196,7 @@ ApplicationWindow { Keys.onReleased: { switch (event.key) { case Qt.Key_Alt: - app.menuBar = menu + app.showMenuBar = !app.showMenuBar break default: break