Commit 7c463bec authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Get icon size from QStyle instead of KIconLoader

Summary: The sizes from KIconLoader are considered to go away in KF6

Test Plan: Open archive. Icons in file view are properly sized

Reviewers: #ark, elvisangelaccio

Reviewed By: #ark, elvisangelaccio

Subscribers: broulik, kde-utils-devel

Tags: #ark

Maniphest Tasks: T11637

Differential Revision: https://phabricator.kde.org/D25378
parent 82d1ad14
......@@ -28,12 +28,13 @@
#include <KIO/Global>
#include <KLocalizedString>
#include <KIconLoader>
#include <QApplication>
#include <QDBusConnection>
#include <QMimeData>
#include <QMimeDatabase>
#include <QRegularExpression>
#include <QStyle>
#include <QUrl>
using namespace Kerfuffle;
......@@ -132,7 +133,7 @@ QVariant ArchiveModel::data(const QModelIndex &index, int role) const
if (index.column() == 0) {
const Archive::Entry *e = static_cast<Archive::Entry*>(index.internalPointer());
QIcon::Mode mode = (filesToMove.contains(e->fullPath())) ? QIcon::Disabled : QIcon::Normal;
return m_entryIcons.value(e->fullPath(NoTrailingSlash)).pixmap(IconSize(KIconLoader::Small), IconSize(KIconLoader::Small), mode);
return m_entryIcons.value(e->fullPath(NoTrailingSlash)).pixmap(QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize), mode);
}
return QVariant();
case Qt::FontRole: {
......
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