Commit 7706e17d authored by Ismael Asensio's avatar Ismael Asensio

Port away from deprecated KIconLoader::IconSize

Summary: Use `QStyle::pixelMetrics` instead

Test Plan:
No compiler warning
Icon still happily bounces on application launch

Reviewers: #kwin, davidedmundson, broulik

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T11637

Differential Revision: https://phabricator.kde.org/D27726
parent fcea0eb2
......@@ -16,7 +16,6 @@ set(kwin_effect_KDE_LIBS
KF5::ConfigWidgets
KF5::GlobalAccel
KF5::I18n
KF5::IconThemes
KF5::Notifications # screenshot effect
KF5::Plasma # screenedge effect
KF5::WindowSystem
......
......@@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QPainter>
// KDE
#include <KConfigGroup>
#include <KIconLoader>
#include <KSharedConfig>
#include <KStartupInfo>
#include <KSelectionOwner>
......@@ -291,7 +290,7 @@ void StartupFeedbackEffect::start(const QString& icon)
m_cursorSize = readCursorSize();
int iconSize = m_cursorSize / 1.5;
if (!iconSize) {
iconSize = IconSize(KIconLoader::Small);
iconSize = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize);
}
// get ratio for bouncing cursor so we don't need to manually calculate the sizes for each icon size
if (m_type == BouncingFeedback)
......
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