vlc_linux/vlc-3.0.16/modules/gui/qt/components/interface_widgets.cpp
/* Set the Widget to the correct Size */
/* Function has to be called by the parent
   Parent has to care about resizing itself */
Set the Widget to the correct Size
Function has to be called by the parent
Parent has to care about resizing itself
Set the Widget to the correct Size Function has to be called by the parent Parent has to care about resizing itself
void VideoWidget::setSize( unsigned int w, unsigned int h )
{
    if( (unsigned)size().width() == w && (unsigned)size().height() == h )
    {
        reportSize();
        return;
    }
    resize( w, h );
    emit sizeChanged( w, h );
    if( (unsigned)size().width() == w && (unsigned)size().height() == h )
        updateGeometry();
    sync();
}
void VideoWidget :: setSize ( unsigned int w , unsigned int h ) { if ( ( unsigned ) size ( ) . width ( ) == w && ( unsigned ) size ( ) . height ( ) == h ) { reportSize ( ) ; return ; } resize ( w , h ) ; emit sizeChanged ( w , h ) ; if ( ( unsigned ) size ( ) . width ( ) == w && ( unsigned ) size ( ) . height ( ) == h ) updateGeometry ( ) ; sync ( ) ; }
Set the Widget to the correct Size
Function has to be called by the parent
Parent has to care about resizing itself
Set the Widget to the correct Size Function has to be called by the parent Parent has to care about resizing itself
/* If the size changed, resizeEvent will be called, otherwise not,
     * in which case we need to tell the vout what the size actually is
     */ /* Work-around a bug?misconception? that would happen when vout core resize
       twice to the same size and would make the vout not centered.
       This cause a small flicker.
       See #3621
     */