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:
parent
5d053551d8
commit
c7153e070e
1 changed files with 13 additions and 9 deletions
22
qml/main.qml
22
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue