From 55bc18a9c06b66d12a8c63a2dc4dae20356c9f6c Mon Sep 17 00:00:00 2001 From: David Sansome Date: Mon, 17 May 2010 00:47:43 +0000 Subject: [PATCH] Fix the appearance of several dialogs when using a high font DPI. Fixes issue #310 --- src/library/groupbydialog.cpp | 2 ++ src/radio/lastfmconfig.cpp | 3 +++ src/radio/lastfmconfig.ui | 6 ++++++ src/radio/lastfmstationdialog.cpp | 2 ++ src/ui/about.cpp | 5 +++++ src/ui/about.ui | 6 +----- src/ui/settingsdialog.cpp | 3 +++ 7 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/library/groupbydialog.cpp b/src/library/groupbydialog.cpp index c80cfb9c8..b06d4974d 100644 --- a/src/library/groupbydialog.cpp +++ b/src/library/groupbydialog.cpp @@ -37,6 +37,8 @@ GroupByDialog::GroupByDialog(QWidget *parent) connect(ui_->button_box->button(QDialogButtonBox::Reset), SIGNAL(clicked()), SLOT(Reset())); + + resize(sizeHint()); } GroupByDialog::~GroupByDialog() { diff --git a/src/radio/lastfmconfig.cpp b/src/radio/lastfmconfig.cpp index 7394eccf8..574539292 100644 --- a/src/radio/lastfmconfig.cpp +++ b/src/radio/lastfmconfig.cpp @@ -34,6 +34,9 @@ LastFMConfig::LastFMConfig(QWidget *parent) connect(service_, SIGNAL(AuthenticationComplete(bool)), SLOT(AuthenticationComplete(bool))); connect(ui_->sign_out, SIGNAL(clicked()), SLOT(SignOut())); + + ui_->username->setMinimumWidth(QFontMetrics(QFont()).width("WWWWWWWWWWWW")); + resize(sizeHint()); } LastFMConfig::~LastFMConfig() { diff --git a/src/radio/lastfmconfig.ui b/src/radio/lastfmconfig.ui index 9221f4bb3..21f2f93e1 100644 --- a/src/radio/lastfmconfig.ui +++ b/src/radio/lastfmconfig.ui @@ -102,6 +102,12 @@ + + + 0 + 0 + + Note that you must be a <span style=" font-weight:600;">paid subscriber</span> to listen to Last.fm radio from within Clementine. diff --git a/src/radio/lastfmstationdialog.cpp b/src/radio/lastfmstationdialog.cpp index f091c7724..5a58ada8c 100644 --- a/src/radio/lastfmstationdialog.cpp +++ b/src/radio/lastfmstationdialog.cpp @@ -22,6 +22,8 @@ LastFMStationDialog::LastFMStationDialog(QWidget* parent) ui_(new Ui_LastFMStationDialog) { ui_->setupUi(this); + + resize(sizeHint()); } LastFMStationDialog::~LastFMStationDialog() { diff --git a/src/ui/about.cpp b/src/ui/about.cpp index aa286e10a..00fbd3b14 100644 --- a/src/ui/about.cpp +++ b/src/ui/about.cpp @@ -30,6 +30,11 @@ About::About(QWidget *parent) ui_.title->setText(QCoreApplication::applicationName()); ui_.version->setText(tr("Version %1").arg(QCoreApplication::applicationVersion())); + QFont title_font; + title_font.setBold(true); + title_font.setPointSize(title_font.pointSize() + 4); + ui_.title->setFont(title_font); + authors_ << Person("David Sansome", "me@davidsansome.com") << Person("John Maguire", "john.maguire@gmail.com"); thanks_to_ << Person("Mark Kretschmann", "markey@web.de") diff --git a/src/ui/about.ui b/src/ui/about.ui index 88a49d991..4bf194ea7 100644 --- a/src/ui/about.ui +++ b/src/ui/about.ui @@ -14,11 +14,7 @@ #line { color: lightgrey; } - -#title { - font-weight: bold; - font-size: 16px; -} + diff --git a/src/ui/settingsdialog.cpp b/src/ui/settingsdialog.cpp index ffa47c316..545d5e16b 100644 --- a/src/ui/settingsdialog.cpp +++ b/src/ui/settingsdialog.cpp @@ -76,6 +76,9 @@ SettingsDialog::SettingsDialog(QWidget* parent) connect(ui_.stacked_widget, SIGNAL(currentChanged(int)), SLOT(UpdatePopupVisible())); connect(ui_.notifications_pretty, SIGNAL(toggled(bool)), SLOT(UpdatePopupVisible())); + + // Make sure the list is big enough to show all the items + ui_.list->setMinimumWidth(ui_.list->sizeHintForColumn(0)); } SettingsDialog::~SettingsDialog() {