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