1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-02-03 02:14:16 +00:00

- Attempt to make progress bar text color dynamic

This commit is contained in:
Christophe Dumez 2007-09-18 19:08:09 +00:00
parent 8a0681744e
commit bdf50483df

View File

@ -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;
} }