mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
IconChooser: Fix drawing selected item with fusion style
This commit is contained in:
parent
c9797f5600
commit
83444d8851
|
@ -117,15 +117,11 @@ void IconChooserDelegate::paint(QPainter* painter, const QStyleOptionViewItem &o
|
||||||
const QStyle* style = w ? w->style() : QApplication::style();
|
const QStyle* style = w ? w->style() : QApplication::style();
|
||||||
|
|
||||||
// Draw background
|
// Draw background
|
||||||
if (mApp->styleName() == QLatin1String("fusion")) {
|
opt.showDecorationSelected = true;
|
||||||
style->drawPrimitive(QStyle::PE_PanelItemViewRow, &opt, painter, w);
|
style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, painter, w);
|
||||||
}
|
|
||||||
else {
|
|
||||||
style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, painter, w);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Draw icon
|
// Draw icon
|
||||||
QIcon icon = index.data(Qt::DecorationRole).value<QIcon>();
|
const QIcon icon = index.data(Qt::DecorationRole).value<QIcon>();
|
||||||
icon.paint(painter, opt.rect);
|
icon.paint(painter, opt.rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user