[vlc-commits] qt: toolbar_editor: fix preview bar ordering

Francois Cartegnie git at videolan.org
Thu Apr 17 14:30:55 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Apr 17 14:30:27 2014 +0200| [864c19f1d21b31b0f63c933c70ff704d1a7adf02] | committer: Francois Cartegnie

qt: toolbar_editor: fix preview bar ordering

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=864c19f1d21b31b0f63c933c70ff704d1a7adf02
---

 modules/gui/qt4/dialogs/toolbar.cpp |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/modules/gui/qt4/dialogs/toolbar.cpp b/modules/gui/qt4/dialogs/toolbar.cpp
index 2c816d2..f102133 100644
--- a/modules/gui/qt4/dialogs/toolbar.cpp
+++ b/modules/gui/qt4/dialogs/toolbar.cpp
@@ -181,7 +181,7 @@ ToolbarEditDialog::ToolbarEditDialog( QWidget *_w, intf_thread_t *_p_intf)
     profileCombo->setCurrentIndex( -1 );
 
     /* Build and prepare our preview */
-    PreviewWidget *previewWidget = new PreviewWidget( controller1, controller2, controller );
+    PreviewWidget *previewWidget = new PreviewWidget( controller, controller1, controller2 );
     QGroupBox *previewBox = new QGroupBox( qtr("Preview"), this );
     previewBox->setLayout( new QVBoxLayout() );
     previewBox->layout()->addWidget( previewWidget );
@@ -315,8 +315,8 @@ void PreviewWidget::paintEvent( QPaintEvent * )
         i_total += pixmaps[i].size().height();
 
     /* Draw top bars */
-    i = ( b_top ) ? 0 : 3;
-    for( ; i<2; i++ )
+    i = ( b_top ) ? 1 : 3;
+    for( ; i<3; i++ )
     {
         painter.drawPixmap( pixmaps[i].rect().translated( 0, i_offset ), pixmaps[i] );
         i_offset += pixmaps[i].rect().height();
@@ -337,8 +337,7 @@ void PreviewWidget::paintEvent( QPaintEvent * )
 
     /* Draw bottom bars */
     i_offset += conearea.height();
-    i = ( b_top ) ? 2 : 0;
-    for( ; i<3; i++ )
+    for( i = 0 ; i< ((b_top) ? 1 : 3); i++ )
     {
         painter.drawPixmap( pixmaps[i].rect().translated( 0, i_offset ), pixmaps[i] );
         i_offset += pixmaps[i].rect().height();



More information about the vlc-commits mailing list