From f9e68a6854d39f37d8a067dc3e348c3d270c4a97 Mon Sep 17 00:00:00 2001 From: Filippo Scognamiglio Date: Mon, 15 Dec 2014 11:56:40 +0100 Subject: [PATCH] Fix: change workaround used to hide the menubar. This works with Qt 5.4 --- app/qml/main.qml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/app/qml/main.qml b/app/qml/main.qml index 5fc5b0d..1310f42 100644 --- a/app/qml/main.qml +++ b/app/qml/main.qml @@ -36,10 +36,12 @@ ApplicationWindow{ property bool fullscreen: appSettings.fullscreen onFullscreenChanged: visibility = (fullscreen ? Window.FullScreen : Window.Windowed) - //Workaround: if menubar is assigned ugly margins are visible. - menuBar: Qt.platform.os === "osx" - ? defaultMenuBar - : appSettings.showMenubar ? defaultMenuBar : null + //Workaround: Without __contentItem a ugly thin border is visible. + menuBar: CRTMainMenuBar{ + id: mainMenu + visible: (Qt.platform.os === "osx" || appSettings.showMenubar) + __contentItem.visible: mainMenu.visible + } color: "#00000000" title: terminalContainer.title || qsTr("cool-retro-term") @@ -102,9 +104,6 @@ ApplicationWindow{ aboutDialog.show(); } } - CRTMainMenuBar{ - id: defaultMenuBar - } ApplicationSettings{ id: appSettings }