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.
This commit is contained in:
Jeena 2016-10-29 08:09:20 +02:00
parent 5d053551d8
commit c7153e070e

View file

@ -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