]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/interface_widgets.cpp
qt4: use slower and better scaling on albumart-label
[vlc] / modules / gui / qt4 / components / interface_widgets.cpp
index efe02f61f8581883429ac29270a3e09faf0a1ca4..f33bac1c21616dd8b5220874b1c3fab17b812f35 100644 (file)
@@ -177,6 +177,13 @@ void VideoWidget::SetSizing( unsigned int w, unsigned int h )
     if( !isVisible() ) show();
     resize( w, h );
     emit sizeChanged( w, h );
+    /* 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
+     */
+    if( size().width() == w && size().height() == h )
+        updateGeometry();
     videoSync();
 }
 
@@ -220,6 +227,12 @@ void VideoWidget::SetFullScreen( bool b_fs )
         }
         reparentable->setParent( NULL, newflags );
         reparentable->setWindowState( newstate );
+
+        /* FIXME: inherit from the vout window, not the interface */
+        char *title = var_InheritString( p_intf, "video-title" );
+        reparentable->setWindowTitle( qfu(title ? title : _("Video")) );
+        free( title );
+
         reparentable->show();
     }
     else
@@ -259,9 +272,8 @@ bool VideoWidget::eventFilter(QObject *obj, QEvent *event)
         }
         else if( event->type() == QEvent::Wheel )
         {
-            int i_vlckey = qtWheelEventToVLCKey( static_cast<QWheelEvent *>( event) );
+            int i_vlckey = qtWheelEventToVLCKey( static_cast<QWheelEvent *>(event) );
             var_SetInteger( p_intf->p_libvlc, "key-pressed", i_vlckey );
-            msg_Dbg( p_intf, "Here: %i", i_vlckey );
             return true;
         }
     }
@@ -581,7 +593,8 @@ void CoverArtLabel::showArtUpdate( const QString& url )
     if( !url.isEmpty() && pix.load( url ) )
     {
         pix = pix.scaled( maximumWidth(), maximumHeight(),
-                          Qt::KeepAspectRatioByExpanding );
+                          Qt::KeepAspectRatioByExpanding,
+                          Qt::SmoothTransformation );
     }
     else
     {