- 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

@@ -77,7 +77,8 @@ class PropListDelegate: public QItemDelegate {
newopt.state |= QStyle::State_Enabled;
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;
}