mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
fix(folderstatusdelegate): improve rendering of icons on HiDPI screens
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
This commit is contained in:
parent
ff94d4b4ea
commit
73b9fbe70b
@ -190,12 +190,14 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
||||
localPathRect.setLeft(nextToIcon);
|
||||
remotePathRect.setLeft(nextToIcon);
|
||||
|
||||
const auto iconSize = iconRect.width();
|
||||
|
||||
auto optionsButtonVisualRect = optionsButtonRect(option.rect, option.direction);
|
||||
|
||||
const auto statusPixmap = statusIcon.pixmap(iconSize, iconSize, syncEnabled ? QIcon::Normal : QIcon::Disabled);
|
||||
painter->drawPixmap(QStyle::visualRect(option.direction, option.rect, iconRect).left(), iconRect.top(), statusPixmap);
|
||||
statusIcon.paint(
|
||||
painter,
|
||||
QStyle::visualRect(option.direction, option.rect, iconRect),
|
||||
Qt::AlignCenter,
|
||||
syncEnabled ? QIcon::Normal : QIcon::Disabled
|
||||
);
|
||||
|
||||
// only show the warning icon if the sync is running. Otherwise its
|
||||
// encoded in the status icon.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user