]> git.sesse.net Git - vlc/commitdiff
Qt: bgWidget, add the margin to trigger the hide of the label when resizing
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 4 Mar 2010 23:44:13 +0000 (00:44 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 8 Mar 2010 22:47:16 +0000 (23:47 +0100)
modules/gui/qt4/components/interface_widgets.cpp

index cd1fb80c3ccd89129e381eea2e8f7b1a713b367a..fc868539f29c62b78bfcf01f72fe88dda42e2439 100644 (file)
@@ -282,6 +282,7 @@ QSize VideoWidget::sizeHint() const
 #define ICON_SIZE 128
 #define MAX_BG_SIZE 400
 #define MIN_BG_SIZE 128
+#define MARGIN 5
 
 BackgroundWidget::BackgroundWidget( intf_thread_t *_p_i )
                  :QWidget( NULL ), p_intf( _p_i )
@@ -298,7 +299,7 @@ BackgroundWidget::BackgroundWidget( intf_thread_t *_p_i )
 
     /* A cone in the middle */
     label = new QLabel;
-    label->setMargin( 5 );
+    label->setMargin( MARGIN );
     label->setAlignment( Qt::AlignCenter );
 
     /* Init the cone art */
@@ -317,7 +318,7 @@ BackgroundWidget::BackgroundWidget( intf_thread_t *_p_i )
 
 void BackgroundWidget::resizeEvent( QResizeEvent * event )
 {
-    if( event->size().height() <= MIN_BG_SIZE )
+    if( event->size().height() <= MIN_BG_SIZE + MARGIN * 2 + 2 )
         label->hide();
     else
         label->show();