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

Hugo Beauzée-Luyssen hugo at beauzee.fr
Sat Mar 12 12:00:32 CET 2016


On 03/11/2016 02:55 PM, Paweł Goliński wrote:
> Updated version of the patch:
> 
> 
> 
> 
>> Wiadomość napisana przez Hugo Beauzée-Luyssen <hugo at beauzee.fr
>> <mailto:hugo at beauzee.fr>> w dniu 11.03.2016, o godz. 11:25:
>>
>> 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,
>> _______________________________________________
>> Vlmc-devel mailing list
>> Vlmc-devel at videolan.org <mailto:Vlmc-devel at videolan.org>
>> https://mailman.videolan.org/listinfo/vlmc-devel
> 
> 
> 
> _______________________________________________
> Vlmc-devel mailing list
> Vlmc-devel at videolan.org
> https://mailman.videolan.org/listinfo/vlmc-devel
> 
Applied, thanks!

-- 
Hugo Beauzée-Luyssen
www.beauzee.fr


More information about the Vlmc-devel mailing list