Skip to content

Commit

Permalink
Make the MenuBar show- and hidebar
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jeena committed Oct 29, 2016
1 parent 5d05355 commit c7153e0
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -192,7 +196,7 @@ ApplicationWindow {
Keys.onReleased: {
switch (event.key) {
case Qt.Key_Alt:
app.menuBar = menu
app.showMenuBar = !app.showMenuBar
break
default:
break
Expand Down

0 comments on commit c7153e0

Please sign in to comment.