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
This commit is contained in:
Ismael Asensio 2020-02-28 20:09:26 +01:00
parent fcea0eb218
commit 7706e17d94
2 changed files with 1 additions and 3 deletions

View file

@ -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

View file

@ -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)