[vlmc-devel] [PATCH] Notify toolbar about fullscreen mode change

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


Hi,

All good, except for cosmetic issues:

On 03/11/2016 12:19 AM, Paweł Goliński wrote:
> Toolbar was not notified about user turning on/off
> fullscreen mode without using toolbar button, which
> caused it to show inconsistent state.
> ---
>   src/Gui/MainWindow.cpp | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
> index 609e710..c162cf9 100644
> --- a/src/Gui/MainWindow.cpp
> +++ b/src/Gui/MainWindow.cpp
> @@ -176,6 +176,13 @@ MainWindow::changeEvent( QEvent *e )
>           m_ui.retranslateUi( this );
>           retranslateUi();
>           break;
> +    case QEvent::WindowStateChange:
> +        if ( isFullScreen() ) {

Please either omit the curly braces, or put them on their own line, as 
per HACKING file

> +            m_ui.actionFullscreen->setChecked( true );
> +        } else {
> +            m_ui.actionFullscreen->setChecked( false );
> +        }
> +        break;
>       default:
>           break;
>       }
> @@ -496,7 +503,7 @@ MainWindow::initToolbar()
>       mouseActions->addAction( m_ui.actionCut_mode );
>       m_ui.actionSelection_mode->setChecked( true );
>       m_ui.toolBar->addActions( mouseActions->actions() );
> -    connect( mouseActions, SIGNAL( triggered(QAction*) ),
> +    connect( mouseActions, SIGNAL( triggered( QAction* ) ),
>                this, SLOT( toolButtonClicked( QAction* ) ) );

This change is unrelated, but would be welcome in a separate patch!

>       m_ui.menuTools->addActions( mouseActions->actions() );
>   }
>

Regards,


More information about the Vlmc-devel mailing list