diff --git a/qt/torrent-delegate-min.cc b/qt/torrent-delegate-min.cc index 4c973f6f5..f50e2466d 100644 --- a/qt/torrent-delegate-min.cc +++ b/qt/torrent-delegate-min.cc @@ -114,6 +114,10 @@ TorrentDelegateMin :: drawTorrent( QPainter * painter, const QStyleOptionViewIte if( option.state & QStyle::State_Selected ) cr = QPalette::HighlightedText; else cr = QPalette::Text; + QStyle::State progressBarState( option.state ); + if( isPaused ) progressBarState = QStyle::State_None; + progressBarState |= QStyle::State_Small; + // layout const QSize m( margin( *style ) ); QRect fillArea( option.rect ); @@ -149,7 +153,7 @@ TorrentDelegateMin :: drawTorrent( QPainter * painter, const QStyleOptionViewIte myProgressBarStyle->direction = option.direction; myProgressBarStyle->palette = option.palette; myProgressBarStyle->palette.setCurrentColorGroup( QPalette::Disabled ); - myProgressBarStyle->state = option.state | QStyle::State_Small; + myProgressBarStyle->state = progressBarState; myProgressBarStyle->progress = int(myProgressBarStyle->minimum + ((tor.percentDone() * (myProgressBarStyle->maximum - myProgressBarStyle->minimum)))); style->drawControl( QStyle::CE_ProgressBar, myProgressBarStyle, painter ); diff --git a/qt/torrent-delegate.cc b/qt/torrent-delegate.cc index d8b9fadf8..d7b36beb6 100644 --- a/qt/torrent-delegate.cc +++ b/qt/torrent-delegate.cc @@ -332,6 +332,10 @@ TorrentDelegate :: drawTorrent( QPainter * painter, const QStyleOptionViewItem& if( option.state & QStyle::State_Selected ) cr = QPalette::HighlightedText; else cr = QPalette::Text; + QStyle::State progressBarState( option.state ); + if( isPaused ) progressBarState = QStyle::State_None; + progressBarState |= QStyle::State_Small; + // layout const QSize m( margin( *style ) ); QRect fillArea( option.rect ); @@ -364,7 +368,7 @@ TorrentDelegate :: drawTorrent( QPainter * painter, const QStyleOptionViewItem& myProgressBarStyle->direction = option.direction; myProgressBarStyle->palette = option.palette; myProgressBarStyle->palette.setCurrentColorGroup( QPalette::Disabled ); - myProgressBarStyle->state = option.state | QStyle::State_Small; + myProgressBarStyle->state = progressBarState; myProgressBarStyle->progress = int(myProgressBarStyle->minimum + ((tor.percentDone() * (myProgressBarStyle->maximum - myProgressBarStyle->minimum)))); style->drawControl( QStyle::CE_ProgressBar, myProgressBarStyle, painter );