]> git.sesse.net Git - vlc/commitdiff
Qt: ExtensionTab: switch to buttonsbox
authorFrancois Cartegnie <fcvlcdev@free.fr>
Sun, 23 Jun 2013 15:01:59 +0000 (17:01 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Sun, 23 Jun 2013 15:02:25 +0000 (17:02 +0200)
modules/gui/qt4/dialogs/plugins.cpp

index b549db4bebb3ed72c6d4eb7c3fef0b2af9ed2651..3a0396a9cee1bea99974aa07eda1803cc70f7555 100644 (file)
@@ -228,16 +228,14 @@ ExtensionTab::ExtensionTab( intf_thread_t *p_intf_ )
     extList->setModel( model );
 
     // Buttons' layout
-    QHBoxLayout *hbox = new QHBoxLayout;
-    hbox->addItem( new QSpacerItem( 1, 1, QSizePolicy::Expanding,
-                                    QSizePolicy::Fixed ) );
+    QDialogButtonBox *buttonsBox = new QDialogButtonBox;
 
     // More information button
     butMoreInfo = new QPushButton( QIcon( ":/menu/info" ),
                                    qtr( "More information..." ),
                                    this );
     CONNECT( butMoreInfo, clicked(), this, moreInformation() );
-    hbox->addWidget( butMoreInfo );
+    buttonsBox->addButton( butMoreInfo, QDialogButtonBox::ActionRole );
 
     // Reload button
     ExtensionsManager *EM = ExtensionsManager::getInstance( p_intf );
@@ -250,10 +248,9 @@ ExtensionTab::ExtensionTab( intf_thread_t *p_intf_ )
              selectionChanged( const QItemSelection &, const QItemSelection & ),
              this,
              updateButtons() );
-    hbox->addWidget( reload );
+    buttonsBox->addButton( reload, QDialogButtonBox::ResetRole );
 
-    // Add buttons hbox
-    layout->addItem( hbox );
+    layout->addWidget( buttonsBox );
     updateButtons();
 }