mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-24 10:16:00 +03:00
parent
a2b0531d5f
commit
5c2b81d78f
1 changed files with 2 additions and 1 deletions
|
@ -53,7 +53,6 @@ void ProgressBarDelegate::initProgressStyleOption(QStyleOptionProgressBar &optio
|
|||
option.progress = static_cast<int>(index.data(m_dataRole).toReal());
|
||||
option.maximum = 100;
|
||||
option.minimum = 0;
|
||||
option.state |= (QStyle::State_Enabled | QStyle::State_Horizontal);
|
||||
option.textVisible = true;
|
||||
}
|
||||
|
||||
|
@ -65,9 +64,11 @@ void ProgressBarDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o
|
|||
QStyleOptionProgressBar newopt;
|
||||
newopt.initFrom(&m_dummyProgressBar);
|
||||
newopt.rect = option.rect;
|
||||
newopt.state = option.state;
|
||||
initProgressStyleOption(newopt, index);
|
||||
|
||||
painter->save();
|
||||
m_dummyProgressBar.style()->drawPrimitive(QStyle::PE_PanelItemViewItem, &option, painter);
|
||||
m_dummyProgressBar.style()->drawControl(QStyle::CE_ProgressBar, &newopt, painter, &m_dummyProgressBar);
|
||||
painter->restore();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue