mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
- Attempt to make progress bar text color dynamic
This commit is contained in:
parent
8a0681744e
commit
bdf50483df
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue