From dead1197bde8f827f51cf65a3c90c2dae0fd4036 Mon Sep 17 00:00:00 2001 From: Filippo Scognamiglio Date: Fri, 23 Nov 2018 22:00:28 +0100 Subject: [PATCH] Hide by default menubar on linux. --- app/qml/ApplicationSettings.qml | 2 +- app/qml/CRTMainMenuBar.qml | 2 +- app/qml/PreprocessedTerminal.qml | 13 ++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/qml/ApplicationSettings.qml b/app/qml/ApplicationSettings.qml index 3a44e6f..3020cb2 100644 --- a/app/qml/ApplicationSettings.qml +++ b/app/qml/ApplicationSettings.qml @@ -41,7 +41,7 @@ QtObject{ property int height: 768 property bool fullscreen: false - property bool showMenubar: true + property bool showMenubar: Qt.platform.os === "osx" ? true : false property string wintitle: "cool-retro-term" diff --git a/app/qml/CRTMainMenuBar.qml b/app/qml/CRTMainMenuBar.qml index 5be179d..be5423e 100644 --- a/app/qml/CRTMainMenuBar.qml +++ b/app/qml/CRTMainMenuBar.qml @@ -11,7 +11,7 @@ MenuBar { } Menu { title: qsTr("Edit") - visible: defaultMenuBar.visible + visible: defaultMenuBar.visible && appSettings.showMenubar MenuItem {action: copyAction} MenuItem {action: pasteAction} MenuSeparator{visible: Qt.platform.os !== "osx"} diff --git a/app/qml/PreprocessedTerminal.qml b/app/qml/PreprocessedTerminal.qml index aa90835..f92d9f7 100644 --- a/app/qml/PreprocessedTerminal.qml +++ b/app/qml/PreprocessedTerminal.qml @@ -149,13 +149,12 @@ Item{ id: linuxContextMenu Menu{ id: contextmenu - MenuItem{action: copyAction} - MenuItem{action: pasteAction} - MenuSeparator{} - MenuItem{action: fullscreenAction} - MenuItem{action: showMenubarAction} - MenuSeparator{visible: !appSettings.showMenubar} - CRTMainMenuBar{visible: !appSettings.showMenubar} + MenuItem { action: copyAction } + MenuItem { action: pasteAction } + MenuSeparator { visible: !appSettings.showMenubar } + MenuItem { action: showsettingsAction ; visible: !appSettings.showMenubar} + MenuSeparator { visible: !appSettings.showMenubar } + CRTMainMenuBar { visible: !appSettings.showMenubar } } } Component {