diff options
| author | Méven Car <[email protected]> | 2020-04-21 09:20:27 +0200 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2020-04-21 09:20:31 +0200 |
| commit | cb085066ae1c4d60b452a12e1da491ce3bfdf75b (patch) | |
| tree | 2841e7e5915b31e756023fb0cdb6d32623ad59ba /src | |
| parent | bb48d4f17155c4d09fdcf7577f9603ab9c80f0ef (diff) | |
Information Panel: Make icons as big as previews
Summary:
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:
Before:
{F8248373, size=full}
After:
{F8248370, size=full}
Reviewers: #dolphin, ngraham, elvisangelaccio
Reviewed By: #dolphin, ngraham, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D29002
Diffstat (limited to 'src')
| -rw-r--r-- | src/panels/information/informationpanelcontent.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index 5c7c7c3f1..6cbdd4b3b 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -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) m_preview->setPixmap( - 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) m_preview->stopAnimatedImage(); m_preview->setPixmap( - 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) { m_outdatedPreviewTimer->stop(); - 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); m_preview->setPixmap(pixmap); } |
