1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

LocationCompleterDelegate: Don't use selected icon mode for favicons

Same reason as previous commit
This commit is contained in:
David Rosca 2018-02-03 19:53:09 +01:00
parent ca60f9a300
commit b24041cb8e
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -95,15 +95,15 @@ void LocationCompleterDelegate::paint(QPainter* painter, const QStyleOptionViewI
const int iconSize = 16;
const int iconYPos = center - (iconSize / 2);
QRect iconRect(leftPosition, iconYPos, iconSize, iconSize);
QPixmap pixmap = index.data(Qt::DecorationRole).value<QIcon>().pixmap(iconSize, iconMode);
QPixmap pixmap = index.data(Qt::DecorationRole).value<QIcon>().pixmap(iconSize);
if (isSearchSuggestion || (isVisitSearchItem && isWebSearch)) {
pixmap = QIcon::fromTheme(QSL("edit-find"), QIcon(QSL(":icons/menu/search-icon.svg"))).pixmap(iconSize, iconMode);
}
if (isVisitSearchItem && bookmark) {
pixmap = bookmark->icon().pixmap(iconSize, iconMode);
pixmap = bookmark->icon().pixmap(iconSize);
} else if (loadAction.type == LocationBar::LoadAction::Search) {
if (loadAction.searchEngine.name != LocationBar::searchEngine().name) {
pixmap = loadAction.searchEngine.icon.pixmap(iconSize, iconMode);
pixmap = loadAction.searchEngine.icon.pixmap(iconSize);
}
}
painter->drawPixmap(iconRect, pixmap);