Improve sidebar readability on mac

Slightly increased the font size. Added a bit
more shadow and tweaked the progress bar.
This commit is contained in:
Jens Bache-Wiig
2010-02-26 16:12:10 +01:00
parent db599cd7eb
commit 7bd076e4f0
4 changed files with 7 additions and 6 deletions

View File

@@ -69,7 +69,7 @@ QColor StyleHelper::mergedColors(const QColor &colorA, const QColor &colorB, int
qreal StyleHelper::sidebarFontSize()
{
#if defined(Q_WS_MAC)
return 9;
return 10;
#else
return 7.5;
#endif

View File

@@ -176,7 +176,7 @@ void FancyToolButton::paintEvent(QPaintEvent *event)
painter.drawText(r, textFlags, ellidedBuildConfiguration);
QStyleOption opt;
opt.initFrom(this);
opt.rect = rect().adjusted(rect().width() - 18, 0, -10, 0);
opt.rect = rect().adjusted(rect().width() - 16, 0, -8, 0);
Utils::StyleHelper::drawArrow(QStyle::PE_IndicatorArrowRight, &painter, &opt);
}

View File

@@ -270,7 +270,7 @@ void FancyTabBar::paintTab(QPainter *painter, int tabIndex) const
boldFont.setPointSizeF(Utils::StyleHelper::sidebarFontSize());
boldFont.setBold(true);
painter->setFont(boldFont);
painter->setPen(selected ? QColor(255, 255, 255, 160) : QColor(30, 30, 30, 80));
painter->setPen(selected ? QColor(255, 255, 255, 160) : QColor(0, 0, 0, 110));
int textFlags = Qt::AlignCenter | Qt::AlignBottom | Qt::ElideRight | Qt::TextWordWrap;
if (enabled) {
painter->drawText(tabTextRect, textFlags, tabText);

View File

@@ -168,7 +168,7 @@ void ProgressBar::paintEvent(QPaintEvent *)
QRect textRect = rect().adjusted(INDENT + 1, 1, -INDENT - 1, 0);
textRect.setHeight(h+5);
p.setPen(QColor(30, 30, 30, 80));
p.setPen(QColor(0, 0, 0, 120));
p.drawText(textRect, alignment | Qt::AlignBottom, m_title);
p.translate(0, -1);
p.setPen(Utils::StyleHelper::panelTextColor());
@@ -213,10 +213,11 @@ void ProgressBar::paintEvent(QPaintEvent *)
p.setBrush(grad);
p.drawRect(inner);
p.setBrush(Qt::NoBrush);
p.setPen(QPen(QColor(0, 0, 0, 60), 1));
p.setPen(QPen(QColor(0, 0, 0, 30), 1));
p.drawLine(inner.topLeft(), inner.topRight());
p.drawLine(inner.topLeft(), inner.bottomLeft());
p.drawLine(inner.topRight(), inner.bottomRight());
p.drawLine(inner.bottomLeft(), inner.bottomRight());
p.drawPoint(inner.bottomLeft());
p.drawPoint(inner.bottomRight());
@@ -224,7 +225,7 @@ void ProgressBar::paintEvent(QPaintEvent *)
if (value() < maximum() && !m_error) {
QRect parentRect = parentWidget()->rect(); // ### Move to parent
QRect cancelRect(parentRect.right() - CANCEL_WIDTH - 2,
parentRect.top() + 5, CANCEL_WIDTH, CANCEL_WIDTH);
parentRect.top() + 4, CANCEL_WIDTH, CANCEL_WIDTH);
bool hover = cancelRect.contains(mapFromGlobal(QCursor::pos()));
p.setPen(QPen(QColor(0, 0, 0, 20), 4));