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

Hugo Beauzée-Luyssen hugo at beauzee.fr
Fri Mar 11 11:32:08 CET 2016


On 03/11/2016 09:27 AM, Paweł Goliński wrote:
> 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
>

I'll need Felix's opinion on this :)

Regards,


More information about the Vlmc-devel mailing list