Fix a progressBar direction for QT 5.15 (#3739)

This commit is contained in:
IMurzich 2022-08-31 16:36:16 +03:00 committed by GitHub
parent ea05474464
commit 272f361237
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -528,14 +528,14 @@ void TorrentDelegate::drawTorrent(QPainter* painter, QStyleOptionViewItem const&
auto const color_role = is_item_selected ? QPalette::HighlightedText : QPalette::Text;
QStyle::State progress_bar_state(option.state | QStyle::State_Horizontal);
QStyle::State progress_bar_state(option.state);
if (is_paused)
{
progress_bar_state = QStyle::State_None;
}
progress_bar_state |= QStyle::State_Small;
progress_bar_state |= QStyle::State_Small | QStyle::State_Horizontal;
QIcon::Mode const emblem_im = is_item_selected ? QIcon::Selected : QIcon::Normal;
QIcon const emblem_icon = tor.hasError() ? getWarningEmblem() : QIcon();

View File

@ -217,14 +217,14 @@ void TorrentDelegateMin::drawTorrent(QPainter* painter, QStyleOptionViewItem con
auto const color_role = is_item_selected ? QPalette::HighlightedText : QPalette::Text;
QStyle::State progress_bar_state(option.state | QStyle::State_Horizontal);
QStyle::State progress_bar_state(option.state);
if (is_paused)
{
progress_bar_state = QStyle::State_None;
}
progress_bar_state |= QStyle::State_Small;
progress_bar_state |= QStyle::State_Small | QStyle::State_Horizontal;
QIcon::Mode const emblem_im = is_item_selected ? QIcon::Selected : QIcon::Normal;
QIcon const emblem_icon = tor.hasError() ? getWarningEmblem() : QIcon();