1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

LocationCompleterDelegate: Draw search engine icon for search shortcuts

This commit is contained in:
David Rosca 2018-01-27 13:32:26 +01:00
parent 8208d7ceda
commit 0cf48359f9
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -95,6 +95,10 @@ void LocationCompleterDelegate::paint(QPainter* painter, const QStyleOptionViewI
}
if (loadAction.type == LocationBar::LoadAction::Bookmark) {
pixmap = IconProvider::instance()->bookmarkIcon().pixmap(iconSize, iconMode);
} else if (loadAction.type == LocationBar::LoadAction::Search) {
if (loadAction.searchEngine.name != LocationBar::searchEngine().name) {
pixmap = loadAction.searchEngine.icon.pixmap(iconSize, iconMode);
}
}
painter->drawPixmap(iconRect, pixmap);
leftPosition = iconRect.right() + m_padding * 2;