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

Paweł Goliński git at videolan.org
Fri Mar 11 11:40:52 CET 2016


vlmc | branch: master | Paweł Goliński <golpaw1 at gmail.com> | Fri Mar 11 09:27:03 2016 +0100| [ce5b9ac496d820022272b9479510ad023b129642] | committer: Hugo Beauzée-Luyssen

Disable toolbar actionFullscreen on OS X >= LION

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.

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> https://code.videolan.org/videolan/vlmc/commit/ce5b9ac496d820022272b9479510ad023b129642
---

 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



More information about the Vlmc-devel mailing list