mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
Account Settings: fix progress being written in white when there are errors
This commit is contained in:
parent
dd34cbc751
commit
8490664860
1 changed files with 2 additions and 8 deletions
|
@ -272,10 +272,7 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
||||||
rect.setRight(option.rect.right() - margin);
|
rect.setRight(option.rect.right() - margin);
|
||||||
|
|
||||||
// save previous state to not mess up colours with the background (fixes issue: https://github.com/nextcloud/desktop/issues/1237)
|
// save previous state to not mess up colours with the background (fixes issue: https://github.com/nextcloud/desktop/issues/1237)
|
||||||
auto oldBrush = painter->brush();
|
painter->save();
|
||||||
auto oldPen = painter->pen();
|
|
||||||
auto oldFont = painter->font();
|
|
||||||
|
|
||||||
painter->setBrush(color);
|
painter->setBrush(color);
|
||||||
painter->setPen(QColor(0xaa, 0xaa, 0xaa));
|
painter->setPen(QColor(0xaa, 0xaa, 0xaa));
|
||||||
painter->drawRoundedRect(QStyle::visualRect(option.direction, option.rect, rect),
|
painter->drawRoundedRect(QStyle::visualRect(option.direction, option.rect, rect),
|
||||||
|
@ -292,11 +289,8 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
||||||
subFm.elidedText(eText, Qt::ElideLeft, textRect.width()));
|
subFm.elidedText(eText, Qt::ElideLeft, textRect.width()));
|
||||||
textRect.translate(0, textRect.height());
|
textRect.translate(0, textRect.height());
|
||||||
}
|
}
|
||||||
|
|
||||||
// restore previous state
|
// restore previous state
|
||||||
painter->setBrush(oldBrush);
|
painter->restore();
|
||||||
painter->setPen(oldPen);
|
|
||||||
painter->setFont(oldFont);
|
|
||||||
|
|
||||||
h = rect.bottom() + margin;
|
h = rect.bottom() + margin;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue