- COSMETIC: Progress bar text now uses style foreground color

This commit is contained in:
Christophe Dumez
2007-09-18 22:09:06 +00:00
parent 654497cd4a
commit 2fc7039cc7
4 changed files with 8 additions and 42 deletions

View File

@@ -79,7 +79,8 @@ class FinishedListDelegate: public QItemDelegate {
newopt.textVisible = false;
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt,
painter);
painter->setPen(QColor("Black"));
QPalette::ColorGroup cg = opt.state & QStyle::State_Enabled ? QPalette::Normal : QPalette::Disabled;
painter->setPen(opt.palette.color(cg, QPalette::WindowText));
painter->drawText(opt.rect, Qt::AlignCenter, newopt.text);
break;
}