- Changed the way progress bars are rendered

This commit is contained in:
Christophe Dumez
2007-08-04 22:14:17 +00:00
parent bee1dbeea4
commit a9692dbe60
4 changed files with 5 additions and 24 deletions

View File

@@ -76,15 +76,9 @@ class PropListDelegate: 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);
//We prefer to display text manually to control color/font/boldness
if (option.state & QStyle::State_Selected){
opt.palette.setColor(QPalette::Text, QColor("grey"));
painter->setPen(opt.palette.color(cg, QPalette::Text));
}
painter->drawText(option.rect, Qt::AlignCenter, newopt.text);
break;
}
case PRIORITY:{