Commit 210ed00a authored by Oliver Bock's avatar Oliver Bock

Disable menu bar toggle on Mac OS X

* It's pointless anyway
* Avoids shortcut ambiguities
parent d348e621
......@@ -33,6 +33,10 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
animControl->setShortcut(QKeySequence(tr("Alt+A")));
ui.menuView->addAction(animControl);
#ifdef __APPLE__
ui.actionMenu_bar->setEnabled(false);
#endif
// inital status (based on GUI)
m_permanentOrbits = ui.actionPermanent_orbits->isChecked();
m_rotationAxesVisible = ui.actionRotationAxes->isChecked();
......@@ -349,12 +353,13 @@ void PulsatingScience::on_actionFullscreen_toggled(bool checked)
window()->setWindowState(windowState() | Qt::WindowFullScreen);
// assuming text being black
setBackgroundRole(QPalette::Text);
#ifndef __APPLE__
if(m_menuBarVisible) {
on_actionMenu_bar_toggled(false);
// keep visibility setting
m_menuBarVisible = true;
}
#endif
if(m_statusBarVisible) ui.statusbar->hide();
if(m_animControlVisible && !m_animControlFloating) {
ui.dockAnimControl->hide();
......@@ -365,9 +370,10 @@ void PulsatingScience::on_actionFullscreen_toggled(bool checked)
else {
window()->setWindowState(windowState() & ~Qt::WindowFullScreen);
setBackgroundRole(QPalette::Window);
#ifndef __APPLE__
if(m_menuBarVisible) on_actionMenu_bar_toggled(true);
if(m_statusBarVisible) ui.statusbar->show();
#endif
if(m_statusBarVisible) ui.statusbar->show();
if(m_animControlVisible && !m_animControlFloating) ui.dockAnimControl->show();
}
}
......
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