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 @@ ...@@ -17,6 +17,7 @@
#include <KAcceleratorManager> #include <KAcceleratorManager>
#include <KActionCollection> #include <KActionCollection>
#include <KActionMenu> #include <KActionMenu>
#include <KIconUtils>
#include <KShortcutsDialog> #include <KShortcutsDialog>
#include <KLocalizedString> #include <KLocalizedString>
#include <KWindowEffects> #include <KWindowEffects>
...@@ -28,7 +29,6 @@ ...@@ -28,7 +29,6 @@
#include <KWindowSystem> #include <KWindowSystem>
#include <KXMLGUIFactory> #include <KXMLGUIFactory>
#include <KNotifyConfigWidget> #include <KNotifyConfigWidget>
#include <KIconLoader>
#include <kio_version.h> #include <kio_version.h>
...@@ -437,7 +437,7 @@ void MainWindow::profileListChanged(const QList<QAction *> &sessionActions) ...@@ -437,7 +437,7 @@ void MainWindow::profileListChanged(const QList<QAction *> &sessionActions)
Profile::Ptr profile = ProfileManager::instance()->defaultProfile(); Profile::Ptr profile = ProfileManager::instance()->defaultProfile();
if (profile && profile->name() == sessionAction->text().remove(QLatin1Char('&'))) { 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); sessionAction->setIcon(icon);
setActionFont(true); setActionFont(true);
} else { } 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