]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/interface_widgets.cpp
Qt: don't limit the artLabel in width
[vlc] / modules / gui / qt4 / components / interface_widgets.cpp
index 1a8deb52de24f171408dc388afa3e57d76d8d3a4..47c1f6076bd23fbde627a025a35da42d5591f8da 100644 (file)
@@ -144,10 +144,6 @@ WId VideoWidget::request( int *pi_x, int *pi_y,
     XSelectInput( dpy, w, attr.your_event_mask );
 #endif
     sync();
-#ifndef NDEBUG
-    msg_Dbg( p_intf, "embedded video ready (handle %p)",
-             (void *)stable->winId() );
-#endif
     return stable->winId();
 }
 
@@ -163,7 +159,7 @@ void VideoWidget::SetSizing( unsigned int w, unsigned int h )
        This cause a small flicker.
        See #3621
      */
-    if( size().width() == w && size().height() == h )
+    if( (unsigned)size().width() == w && (unsigned)size().height() == h )
         updateGeometry();
     sync();
 }
@@ -212,7 +208,7 @@ void BackgroundWidget::updateArt( const QString& url )
     }
     else
     {   /* Xmas joke */
-        if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY )
+        if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) )
             pixmapUrl = QString( ":/logo/vlc128-xmas.png" );
         else
             pixmapUrl = QString( ":/logo/vlc128.png" );
@@ -235,8 +231,8 @@ void BackgroundWidget::paintEvent( QPaintEvent *e )
     QBitmap pMask;
     float f_alpha = 1.0;
 
-    i_maxwidth = std::min( maximumWidth(), width() ) - MARGIN * 2;
-    i_maxheight = std::min( maximumHeight(), height() ) - MARGIN * 2;
+    i_maxwidth  = __MIN( maximumWidth(), width() ) - MARGIN * 2;
+    i_maxheight = __MIN( maximumHeight(), height() ) - MARGIN * 2;
 
     if ( height() > MARGIN * 2 )
     {
@@ -477,7 +473,6 @@ CoverArtLabel::CoverArtLabel( QWidget *parent, intf_thread_t *_p_i )
     setMinimumHeight( 128 );
     setMinimumWidth( 128 );
     setMaximumHeight( 128 );
-    setMaximumWidth( 128 );
     setScaledContents( false );
     setAlignment( Qt::AlignCenter );