Commit e1eb9f42 authored by Lorenz Meier's avatar Lorenz Meier

Fix native menu bar on Mac OS

parent 334f0187
......@@ -186,15 +186,8 @@ void MainWindow::init()
// Setup user interface
ui.setupUi(this);
hide();
menuActionHelper->setMenu(ui.menuTools);
// 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
// Set dock options
setDockOptions(AnimatedDocks | AllowTabbedDocks | AllowNestedDocks);
......@@ -203,6 +196,12 @@ void MainWindow::init()
// 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
// Setup UI state machines
centerStackActionGroup->setExclusive(true);
......
......@@ -9,7 +9,6 @@ QGCWelcomeMainWindow::QGCWelcomeMainWindow(QWidget *parent) :
storeSettings(false)
{
ui->setupUi(this);
statusBar()->hide();
QString windowname = qApp->applicationName() + " " + qApp->applicationVersion();
setWindowTitle(windowname);
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<author/>
<comment/>
<exportmacro/>
<class>QGCWelcomeMainWindow</class>
<widget class="QMainWindow" name="QGCWelcomeMainWindow">
<property name="geometry">
......@@ -15,10 +13,8 @@
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QMenuBar" name="menubar"/>
<widget class="QWidget" name="centralwidget"/>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<pixmapfunction/>
<resources/>
<connections/>
</ui>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment