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() ...@@ -186,15 +186,8 @@ void MainWindow::init()
// Setup user interface // Setup user interface
ui.setupUi(this); ui.setupUi(this);
hide();
menuActionHelper->setMenu(ui.menuTools); 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 // Set dock options
setDockOptions(AnimatedDocks | AllowTabbedDocks | AllowNestedDocks); setDockOptions(AnimatedDocks | AllowTabbedDocks | AllowNestedDocks);
...@@ -203,6 +196,12 @@ void MainWindow::init() ...@@ -203,6 +196,12 @@ void MainWindow::init()
// Setup corners // Setup corners
setCorner(Qt::BottomRightCorner, Qt::BottomDockWidgetArea); 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 // Setup UI state machines
centerStackActionGroup->setExclusive(true); centerStackActionGroup->setExclusive(true);
......
...@@ -9,7 +9,6 @@ QGCWelcomeMainWindow::QGCWelcomeMainWindow(QWidget *parent) : ...@@ -9,7 +9,6 @@ QGCWelcomeMainWindow::QGCWelcomeMainWindow(QWidget *parent) :
storeSettings(false) storeSettings(false)
{ {
ui->setupUi(this); ui->setupUi(this);
statusBar()->hide();
QString windowname = qApp->applicationName() + " " + qApp->applicationVersion(); QString windowname = qApp->applicationName() + " " + qApp->applicationVersion();
setWindowTitle(windowname); setWindowTitle(windowname);
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<author/>
<comment/>
<exportmacro/>
<class>QGCWelcomeMainWindow</class> <class>QGCWelcomeMainWindow</class>
<widget class="QMainWindow" name="QGCWelcomeMainWindow"> <widget class="QMainWindow" name="QGCWelcomeMainWindow">
<property name="geometry"> <property name="geometry">
...@@ -15,10 +13,8 @@ ...@@ -15,10 +13,8 @@
<property name="windowTitle"> <property name="windowTitle">
<string>MainWindow</string> <string>MainWindow</string>
</property> </property>
<widget class="QMenuBar" name="menubar"/>
<widget class="QWidget" name="centralwidget"/> <widget class="QWidget" name="centralwidget"/>
<widget class="QStatusBar" name="statusbar"/>
</widget> </widget>
<pixmapfunction/> <resources/>
<connections/> <connections/>
</ui> </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