mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
- COSMETIC: Improved progress bar text rendering
This commit is contained in:
parent
1fbbee794c
commit
6ed565a06b
10 changed files with 100 additions and 25 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue