mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 05:13:30 -07:00
- COSMETIC: Progress bar text now uses style foreground color
This commit is contained in:
parent
654497cd4a
commit
2fc7039cc7
4 changed files with 8 additions and 42 deletions
|
@ -79,7 +79,8 @@ class FinishedListDelegate: public QItemDelegate {
|
|||
newopt.textVisible = false;
|
||||
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt,
|
||||
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);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -63,7 +63,8 @@ class PreviewListDelegate: public QItemDelegate {
|
|||
newopt.state |= QStyle::State_Enabled;
|
||||
newopt.textVisible = false;
|
||||
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt, 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);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -77,7 +77,8 @@ class PropListDelegate: public QItemDelegate {
|
|||
newopt.state |= QStyle::State_Enabled;
|
||||
newopt.textVisible = false;
|
||||
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt, 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);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue