Replace removed progress bar option orientation with state flag

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2022-11-23 17:52:47 +01:00 committed by Matthieu Gallien
parent 7a17a51a25
commit aaea45110f

View File

@ -312,7 +312,7 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
progressBarOpt.minimum = 0;
progressBarOpt.maximum = 100;
progressBarOpt.progress = overallPercent;
progressBarOpt.orientation = Qt::Horizontal;
progressBarOpt.state = QStyle::StateFlag::State_Horizontal;
progressBarOpt.rect = QStyle::visualRect(option.direction, option.rect, progressBarRect);
#ifdef Q_OS_MACOS
backupStyle->drawControl(QStyle::CE_ProgressBar, &progressBarOpt, painter, option.widget);
@ -320,7 +320,6 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &progressBarOpt, painter, option.widget);
#endif
// Overall Progress Text
QRect overallProgressRect;
overallProgressRect.setTop(progressBarRect.bottom() + margin);