[vlmc-devel] [PATCH] Disable toolbar actionFullscreen on OS X >= LION

Paweł Goliński golpaw1 at gmail.com
Fri Mar 11 09:27:03 CET 2016


We shouldn't duplicate fullscreen action on
toolbar if OS X is >= LION, because it is a standard
action of all apps running on those versions.
---
 src/Gui/MainWindow.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 609e710..d18db1a 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -33,6 +33,7 @@
 #include <QUndoStack>
 #include <QUrl>
 #include <QNetworkProxy>
+#include <QSysInfo>
 #include "Main/Core.h"
 #include "Project/Project.h"
 #include "Library/Library.h"
@@ -499,6 +500,13 @@ MainWindow::initToolbar()
     connect( mouseActions, SIGNAL( triggered(QAction*) ),
              this, SLOT( toolButtonClicked( QAction* ) ) );
     m_ui.menuTools->addActions( mouseActions->actions() );
+#if defined ( Q_OS_MAC )
+    // Use native fullscreen on OS X >= LION
+    if ( QSysInfo::macVersion() >= QSysInfo::MV_LION ) {
+        m_ui.actionFullscreen->setEnabled( false );
+        m_ui.actionFullscreen->setVisible( false );
+    }
+#endif
 }
 
 void
-- 
2.5.4 (Apple Git-61)



More information about the Vlmc-devel mailing list