Status dialog> Do not adjust pen when using Vista Style

Light blue and white are not contrasting enough
This commit is contained in:
Daniel Molkentin 2013-06-10 16:33:05 +02:00
Родитель 1c6bc84d2d
Коммит b03c168175
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -169,10 +169,15 @@ void FolderViewDelegate::paint(QPainter *painter, const QStyleOptionViewItem &op
painter->drawPixmap(QPoint(statusRect.left(), statusRect.top()), statusIcon.pixmap(48,48));
if ((option.state & QStyle::State_Selected) && (option.state & QStyle::State_Active))
if ((option.state & QStyle::State_Selected)
&& (option.state & QStyle::State_Active)
// Hack: Windows Vista's light blue is not contrasting enough for white
&& !Application::style()->inherits("QWindowsVistaStyle")) {
painter->setPen(option.palette.color(QPalette::HighlightedText));
else
}
else {
painter->setPen(option.palette.color(QPalette::Text));
}
painter->setFont(aliasFont);
painter->drawText(aliasRect, aliasText);