diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc index 77183241236be67e2f0e845f24967c768d651704..fc008267a7c04431fb9dbf274653af4a1965286d 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);