From 3cdaf7d4dc20f908b18bc12040947dab2666ee9a Mon Sep 17 00:00:00 2001 From: kirilma Date: Tue, 4 May 2010 05:58:05 +0000 Subject: [PATCH] UI tune: use buttonBox instead of single buttons to comply with platform conventions maemo5 does not print "Cancel" buttons, and names "OK" differently just use buttonBox, and it will behave properly at each platform --- src/gui/conferenceeditor.cpp | 1 + src/gui/conferenceeditor.ui | 41 ++++++++++++++++++++++++ src/gui/settingsdialog.cpp | 2 +- src/gui/settingsdialog.ui | 61 ++++++++++-------------------------- 4 files changed, 59 insertions(+), 46 deletions(-) diff --git a/src/gui/conferenceeditor.cpp b/src/gui/conferenceeditor.cpp index 7d65484..34eb7e3 100644 --- a/src/gui/conferenceeditor.cpp +++ b/src/gui/conferenceeditor.cpp @@ -49,6 +49,7 @@ ConferenceEditor::ConferenceEditor(ConferenceModel* model, QWidget* parent) connect(changeUrl, SIGNAL(clicked()), SLOT(changeUrlClicked())); connect(refreshBtn, SIGNAL(clicked()), SLOT(refreshClicked())); connect(showMapButton, SIGNAL(clicked()), SLOT(conferenceMapClicked())); + connect(buttonBox, SIGNAL(rejected()), SLOT(close())); // it's OK to emit selection signals here // because they are not yet connected to anybody diff --git a/src/gui/conferenceeditor.ui b/src/gui/conferenceeditor.ui index 2f3a9ed..8ee3908 100644 --- a/src/gui/conferenceeditor.ui +++ b/src/gui/conferenceeditor.ui @@ -253,6 +253,12 @@ + + + 0 + 0 + + @@ -285,6 +291,41 @@ + + + + + 0 + + + 0 + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + QDialogButtonBox::Close + + + false + + + + + + diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index 2e47556..1fa81d7 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -31,7 +31,7 @@ SettingsDialog::SettingsDialog(QWidget *aParent) port->setValue(AppSettings::proxyPort()); directConnection->setChecked(AppSettings::isDirectConnection()); - connect(okButton, SIGNAL(clicked()), SLOT(saveDialogData())); + connect(buttonBox, SIGNAL(accepted()), SLOT(saveDialogData())); connect(directConnection, SIGNAL(clicked(bool)), SLOT(connectionTypeChanged(bool))); if(directConnection->isChecked()) diff --git a/src/gui/settingsdialog.ui b/src/gui/settingsdialog.ui index 2c6a1ca..940b03c 100644 --- a/src/gui/settingsdialog.ui +++ b/src/gui/settingsdialog.ui @@ -2,20 +2,18 @@ SettingsDialog - - - 0 - 0 - 469 - 195 - - 0 0 + + + 500 + 0 + + Settings @@ -69,46 +67,19 @@ - - - - Qt::Vertical - - - - 20 - 24 - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - OK - - - - - + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + -- 2.39.5