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
This commit is contained in:
Gerald Combs 2012-08-01 00:06:21 +00:00
parent b667cc5a99
commit 0c3fd84ef5
3 changed files with 18 additions and 8 deletions

View File

@ -33,6 +33,9 @@
LabelStack::LabelStack(QWidget *parent) :
QLabel(parent)
{
#ifdef Q_WS_MAC
setAttribute(Qt::WA_MacSmallSize, true);
#endif
m_temporaryCtx = -1;
fillLabel();
}

View File

@ -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);

View File

@ -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();
}