- COSMETIC: Improved progress bar text rendering

This commit is contained in:
Christophe Dumez 2007-10-13 08:32:31 +00:00
commit 6ed565a06b
10 changed files with 100 additions and 25 deletions

View file

@ -83,12 +83,9 @@ class DLListDelegate: public QItemDelegate {
newopt.maximum = 100;
newopt.minimum = 0;
newopt.state |= QStyle::State_Enabled;
newopt.textVisible = false;
newopt.textVisible = true;
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt,
painter);
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;
}
default: