From: Francois Cartegnie Date: Thu, 23 Sep 2010 19:07:19 +0000 (+0200) Subject: Qt: make help dialog use standard buttons X-Git-Tag: 1.2.0-pre1~5229 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=e7e4692fcc4d12494d0896553f686c7d5b9a8b58;p=vlc Qt: make help dialog use standard buttons --- diff --git a/modules/gui/qt4/dialogs/help.cpp b/modules/gui/qt4/dialogs/help.cpp index a5d77a9703..fce2509c3e 100644 --- a/modules/gui/qt4/dialogs/help.cpp +++ b/modules/gui/qt4/dialogs/help.cpp @@ -55,17 +55,18 @@ HelpDialog::HelpDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) setWindowRole( "vlc-help" ); setMinimumSize( 350, 300 ); - QGridLayout *layout = new QGridLayout( this ); + QVBoxLayout *layout = new QVBoxLayout( this ); QTextBrowser *helpBrowser = new QTextBrowser( this ); helpBrowser->setOpenExternalLinks( true ); helpBrowser->setHtml( qtr(I_LONGHELP) ); - QPushButton *closeButton = new QPushButton( qtr( "&Close" ) ); - closeButton->setDefault( true ); + QDialogButtonBox *closeButtonBox = + new QDialogButtonBox( QDialogButtonBox::Close, Qt::Horizontal, this ); + closeButtonBox->setFocus(); - layout->addWidget( helpBrowser, 0, 0, 1, 0 ); - layout->addWidget( closeButton, 1, 3 ); + layout->addWidget( helpBrowser ); + layout->addWidget( closeButtonBox ); - BUTTONACT( closeButton, close() ); + CONNECT( closeButtonBox, rejected(), this, close() ); readSettings( "Help", QSize( 500, 450 ) ); }