Tasks model: don't load 4 icon sizes to then just use one.

Reviewers: hein

Reviewed By: hein

Subscribers: broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D1841
wilder-5.14
David Faure 10 years ago
parent b77a13079c
commit 07d950bded
  1. 12
      libtaskmanager/xwindowtasksmodel.cpp

@ -657,17 +657,15 @@ QUrl XWindowTasksModel::Private::launcherUrl(WId window)
return data.url;
}
const QIcon &i = icon(window);
QUrl url = data.url;
// FIXME Hard-coding 64x64 or SizeLarge is not scaling-aware.
if (i.isNull()) {
const QPixmap pixmap = KWindowSystem::icon(window, KIconLoader::SizeLarge, KIconLoader::SizeLarge, false);
if (pixmap.isNull()) {
return data.url;
}
QUrl url = data.url;
QUrlQuery uQuery(url);
// FIXME Hard-coding 64px is not scaling-aware.
const QPixmap pixmap = i.pixmap(QSize(64, 64));
QByteArray bytes;
QBuffer buffer(&bytes);
buffer.open(QIODevice::WriteOnly);

Loading…
Cancel
Save