From 3fd16aaa92974139d56eb0093d7df0e37abcb121 Mon Sep 17 00:00:00 2001 From: Benno Eigenmann Date: Wed, 29 Jul 2015 08:52:22 +0200 Subject: [PATCH] MainToolBar blank on Ubunto 15.04 --- src/ui/MainWindow.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc index 771832412..fc008267a 100644 --- a/src/ui/MainWindow.cc +++ b/src/ui/MainWindow.cc @@ -143,6 +143,10 @@ MainWindow::MainWindow(QSplashScreen* splashScreen) connect(this, &MainWindow::initStatusChanged, splashScreen, &QSplashScreen::showMessage); } + // Qt 4/5 on Ubuntu does place the native menubar correctly so on Linux we revert back to in-window menu bar. +#ifdef Q_OS_LINUX + menuBar()->setNativeMenuBar(false); +#endif // Setup user interface loadSettings(); emit initStatusChanged(tr("Setting up user interface"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141)); @@ -160,13 +164,6 @@ MainWindow::MainWindow(QSplashScreen* splashScreen) // Setup corners setCorner(Qt::BottomRightCorner, Qt::BottomDockWidgetArea); - // Qt 4 on Ubuntu does place the native menubar correctly so on Linux we revert back to in-window menu bar. - // TODO: Check that this is still necessary on Qt5 on Ubuntu - -#ifdef Q_OS_LINUX - menuBar()->setNativeMenuBar(false); -#endif - // On Mobile devices, we don't want any main menus at all. #ifdef __mobile__ menuBar()->setNativeMenuBar(false); -- 2.22.0