Browse Source

- Attempt to make progress bar text color dynamic

adaptive-webui-19844
Christophe Dumez 17 years ago
parent
commit
bdf50483df
  1. 3
      src/DLListDelegate.h

3
src/DLListDelegate.h

@ -86,7 +86,8 @@ class DLListDelegate: public QItemDelegate {
newopt.textVisible = false; newopt.textVisible = false;
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt, QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt,
painter); 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); painter->drawText(opt.rect, Qt::AlignCenter, newopt.text);
break; break;
} }

Loading…
Cancel
Save