Commit 562f8e44 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Port from KIconLoader::loadIcon to KIconUtils::addOverlay + QIcon::fromTheme

This fixes the rendering on highdpi screens
parent 9f7cb32d
......@@ -17,6 +17,7 @@
#include <KAcceleratorManager>
#include <KActionCollection>
#include <KActionMenu>
#include <KIconUtils>
#include <KShortcutsDialog>
#include <KLocalizedString>
#include <KWindowEffects>
......@@ -28,7 +29,6 @@
#include <KWindowSystem>
#include <KXMLGUIFactory>
#include <KNotifyConfigWidget>
#include <KIconLoader>
#include <kio_version.h>
......@@ -437,7 +437,7 @@ void MainWindow::profileListChanged(const QList<QAction *> &sessionActions)
Profile::Ptr profile = ProfileManager::instance()->defaultProfile();
if (profile && profile->name() == sessionAction->text().remove(QLatin1Char('&'))) {
QIcon icon(KIconLoader::global()->loadIcon(profile->icon(), KIconLoader::Small, 0, KIconLoader::DefaultState, QStringList(QStringLiteral("emblem-favorite"))));
QIcon icon = KIconUtils::addOverlay(QIcon::fromTheme(profile->icon()), QIcon::fromTheme(QStringLiteral("emblem-favorite")), Qt::BottomRightCorner);
sessionAction->setIcon(icon);
setActionFont(true);
} else {
......
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