vlc_linux/vlc-3.0.16/modules/gui/qt/main_interface.cpp
/*
 * setMinimalView is the private function used by
 * the SLOT toggleMinimalView
 */
setMinimalView is the private function used by
the SLOT toggleMinimalView
setMinimalView is the private function used by the SLOT toggleMinimalView
void MainInterface::setMinimalView( bool b_minimal )
{
    bool b_menuBarVisible = menuBar()->isVisible();
    bool b_controlsVisible = controls->isVisible();
    bool b_statusBarVisible = statusBar()->isVisible();
    bool b_inputCVisible = inputC->isVisible();
    if( !isFullScreen() && !isMaximized() && b_minimal && !b_isWindowTiled )
    {
        int i_heightChange = 0;
        if( b_menuBarVisible )
            i_heightChange += menuBar()->height();
        if( b_controlsVisible )
            i_heightChange += controls->height();
        if( b_statusBarVisible )
            i_heightChange += statusBar()->height();
        if( b_inputCVisible )
            i_heightChange += inputC->height();
        if( i_heightChange != 0 )
            resizeWindow( width(), height() - i_heightChange );
    }
    menuBar()->setVisible( !b_minimal );
    controls->setVisible( !b_minimal );
    statusBar()->setVisible( !b_minimal && b_statusbarVisible );
    inputC->setVisible( !b_minimal );
    if( !isFullScreen() && !isMaximized() && !b_minimal && !b_isWindowTiled )
    {
        int i_heightChange = 0;
        if( !b_menuBarVisible && menuBar()->isVisible() )
            i_heightChange += menuBar()->height();
        if( !b_controlsVisible && controls->isVisible() )
            i_heightChange += controls->height();
        if( !b_statusBarVisible && statusBar()->isVisible() )
            i_heightChange += statusBar()->height();
        if( !b_inputCVisible && inputC->isVisible() )
            i_heightChange += inputC->height();
        if( i_heightChange != 0 )
            resizeWindow( width(), height() + i_heightChange );
    }
}
void MainInterface :: setMinimalView ( bool b_minimal ) { bool b_menuBarVisible = menuBar ( ) -> isVisible ( ) ; bool b_controlsVisible = controls -> isVisible ( ) ; bool b_statusBarVisible = statusBar ( ) -> isVisible ( ) ; bool b_inputCVisible = inputC -> isVisible ( ) ; if ( ! isFullScreen ( ) && ! isMaximized ( ) && b_minimal && ! b_isWindowTiled ) { int i_heightChange = 0 ; if ( b_menuBarVisible ) i_heightChange += menuBar ( ) -> height ( ) ; if ( b_controlsVisible ) i_heightChange += controls -> height ( ) ; if ( b_statusBarVisible ) i_heightChange += statusBar ( ) -> height ( ) ; if ( b_inputCVisible ) i_heightChange += inputC -> height ( ) ; if ( i_heightChange != 0 ) resizeWindow ( width ( ) , height ( ) - i_heightChange ) ; } menuBar ( ) -> setVisible ( ! b_minimal ) ; controls -> setVisible ( ! b_minimal ) ; statusBar ( ) -> setVisible ( ! b_minimal && b_statusbarVisible ) ; inputC -> setVisible ( ! b_minimal ) ; if ( ! isFullScreen ( ) && ! isMaximized ( ) && ! b_minimal && ! b_isWindowTiled ) { int i_heightChange = 0 ; if ( ! b_menuBarVisible && menuBar ( ) -> isVisible ( ) ) i_heightChange += menuBar ( ) -> height ( ) ; if ( ! b_controlsVisible && controls -> isVisible ( ) ) i_heightChange += controls -> height ( ) ; if ( ! b_statusBarVisible && statusBar ( ) -> isVisible ( ) ) i_heightChange += statusBar ( ) -> height ( ) ; if ( ! b_inputCVisible && inputC -> isVisible ( ) ) i_heightChange += inputC -> height ( ) ; if ( i_heightChange != 0 ) resizeWindow ( width ( ) , height ( ) + i_heightChange ) ; } }
setMinimalView is the private function used by
 the SLOT toggleMinimalView
setMinimalView is the private function used by the SLOT toggleMinimalView