mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
IconChooser: Fix drawing with HighDPI
This commit is contained in:
parent
157889db70
commit
937542b411
@ -121,8 +121,9 @@ void IconChooserDelegate::paint(QPainter* painter, const QStyleOptionViewItem &o
|
||||
style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, painter, w);
|
||||
|
||||
// Draw icon
|
||||
const int padding = opt.rect.width() / 4;
|
||||
const QIcon icon = index.data(Qt::DecorationRole).value<QIcon>();
|
||||
icon.paint(painter, opt.rect);
|
||||
icon.paint(painter, opt.rect.adjusted(padding, padding, -padding, -padding));
|
||||
}
|
||||
|
||||
QSize IconChooserDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
|
Loading…
Reference in New Issue
Block a user