Commit cb085066 authored by Méven Car's avatar Méven Car
Browse files

Information Panel: Make icons as big as previews

Make icons match the preview size.
It prevents a user that had a wide information panel,
seeing a size difference between a preview and an icon despite they can look similar (i.e folder preview).

Test Plan:
{F8248373, size=full}

{F8248370, size=full}

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision:
parent bb48d4f1
......@@ -233,7 +233,7 @@ void InformationPanelContent::refreshPreview()
// in the case of a search-URL the URL is not readable for humans
// (at least not useful to show in the Information Panel)
QIcon::fromTheme(QStringLiteral("baloo")).pixmap(KIconLoader::SizeEnormous, KIconLoader::SizeEnormous)
QIcon::fromTheme(QStringLiteral("baloo")).pixmap(m_preview->height(), m_preview->width())
} else {
......@@ -314,7 +314,7 @@ void InformationPanelContent::showItems(const KFileItemList& items)
QIcon::fromTheme(QStringLiteral("dialog-information")).pixmap(KIconLoader::SizeEnormous, KIconLoader::SizeEnormous)
QIcon::fromTheme(QStringLiteral("dialog-information")).pixmap(m_preview->height(), m_preview->width())
setNameLabelText(i18ncp("@label", "%1 item selected", "%1 items selected", items.count()));
......@@ -358,7 +358,7 @@ bool InformationPanelContent::eventFilter(QObject* obj, QEvent* event)
void InformationPanelContent::showIcon(const KFileItem& item)
QPixmap pixmap = QIcon::fromTheme(item.iconName()).pixmap(KIconLoader::SizeEnormous, KIconLoader::SizeEnormous);
QPixmap pixmap = QIcon::fromTheme(item.iconName()).pixmap(m_preview->height(), m_preview->width());
KIconLoader::global()->drawOverlays(item.overlays(), pixmap, KIconLoader::Desktop);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment