From 562f8e444fabcaa0ce46a67dbbdbc86f02aa90dd Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Tue, 27 Apr 2021 01:12:03 +0200 Subject: [PATCH] Port from KIconLoader::loadIcon to KIconUtils::addOverlay + QIcon::fromTheme This fixes the rendering on highdpi screens --- src/MainWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 6774acb0c..2ce1d7fcb 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -28,7 +29,6 @@ #include #include #include -#include #include @@ -437,7 +437,7 @@ void MainWindow::profileListChanged(const QList &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 {