From 0c3fd84ef5072a5ea60eccf780f06ef56f5a3f6a Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 1 Aug 2012 00:06:21 +0000 Subject: [PATCH] Adjust the text size on OS X. This introduces an artifact that affects the expert indicator. Maybe we should use SVG icons instead of PNGs. svn path=/trunk/; revision=44176 --- ui/qt/label_stack.cpp | 3 +++ ui/qt/main_status_bar.cpp | 11 +++-------- ui/qt/progress_bar.cpp | 12 ++++++++++++ 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/ui/qt/label_stack.cpp b/ui/qt/label_stack.cpp index ad71b132d6..275e125606 100644 --- a/ui/qt/label_stack.cpp +++ b/ui/qt/label_stack.cpp @@ -33,6 +33,9 @@ LabelStack::LabelStack(QWidget *parent) : QLabel(parent) { +#ifdef Q_WS_MAC + setAttribute(Qt::WA_MacSmallSize, true); +#endif m_temporaryCtx = -1; fillLabel(); } diff --git a/ui/qt/main_status_bar.cpp b/ui/qt/main_status_bar.cpp index fa387cc2e9..fe5b6896e2 100644 --- a/ui/qt/main_status_bar.cpp +++ b/ui/qt/main_status_bar.cpp @@ -134,7 +134,7 @@ MainStatusBar::MainStatusBar(QWidget *parent) : QWidget *infoProgress = new QWidget(this); QHBoxLayout *infoProgressHB = new QHBoxLayout(infoProgress); -#ifdef Q_WS_WIN +#if defined(Q_WS_WIN) // Handles are the same color as widgets, at least on Windows 7. splitter->setHandleWidth(3); splitter->setStyleSheet(QString( @@ -143,6 +143,8 @@ MainStatusBar::MainStatusBar(QWidget *parent) : " border-right: 1px solid palette(mid);" "}" )); +#elif defined(Q_WS_MAC) + m_expertStatus.setAttribute(Qt::WA_MacSmallSize, true); #endif m_expertStatus.setTextFormat(Qt::RichText); @@ -151,14 +153,7 @@ MainStatusBar::MainStatusBar(QWidget *parent) : // XXX Add the comment icon infoProgressHB->setMargin(0); - infoProgressHB->setSpacing(0); infoProgressHB->setContentsMargins(0, 0, 0, 0); - m_progressBar.setStyleSheet(QString( - "ProgressBar {" - " max-width: 8em;" - " min-height: 0.8em;" - " max-height: 1em;" - "}")); m_infoStatus.setTemporaryContext(STATUS_CTX_TEMPORARY); diff --git a/ui/qt/progress_bar.cpp b/ui/qt/progress_bar.cpp index e02cd7d6ae..8bcafa5a8a 100644 --- a/ui/qt/progress_bar.cpp +++ b/ui/qt/progress_bar.cpp @@ -117,6 +117,18 @@ ProgressBar::ProgressBar(QWidget *parent) : { m_dlg.progressBar = this; m_dlg.topLevelWindow = window(); + +//#ifdef Q_WS_MAC +// setAttribute(Qt::WA_MacSmallSize, true); +//#endif + setStyleSheet(QString( + "ProgressBar {" + " max-width: 20em;" + " min-height: 0.8em;" + " max-height: 1em;" + " border-bottom: 0;" + "}")); + hide(); }