From 7715020fd01cbc7b91e30dc51b64ff63928ff90e Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 24 May 2024 07:20:59 +0300 Subject: [PATCH] plasma: correct comment in Plasma::IconWidgetPrivate::decoration() it is deffinetly not KFileItemDelegate but it was probably copy-pasted from there Signed-off-by: Ivailo Monev --- plasma/widgets/iconwidget.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plasma/widgets/iconwidget.cpp b/plasma/widgets/iconwidget.cpp index a10ad8fa..e7b2ccfe 100644 --- a/plasma/widgets/iconwidget.cpp +++ b/plasma/widgets/iconwidget.cpp @@ -804,7 +804,7 @@ QPixmap IconWidgetPrivate::decoration(const QStyleOptionGraphicsItem *option, bo if (iconSvg) { if (iconSvgElementChanged || iconSvgPixmap.size() != iconSize.toSize()) { - //even the svg is returned at standard sizes because: + // even the svg is returned at standard sizes because: // * it may have a version optimized for that size // * look aligned with other icons iconSvg->resize(finalSize); @@ -813,7 +813,7 @@ QPixmap IconWidgetPrivate::decoration(const QStyleOptionGraphicsItem *option, bo } result = iconSvgPixmap; } else { - //the QIcon isn't filled with available sizes, return a near standard size for small pixmaps + // the QIcon isn't filled with available sizes, return a near standard size for small pixmaps if (!icon.availableSizes().isEmpty()) { finalSize = icon.actualSize(iconSize.toSize(), mode, state); } @@ -827,9 +827,8 @@ QPixmap IconWidgetPrivate::decoration(const QStyleOptionGraphicsItem *option, bo if (!result.isNull() && useHoverEffect) { KIconEffect *effect = KIconLoader::global()->iconEffect(); - // Note that in KIconLoader terminology, active = hover. - // We're assuming that the icon group is desktop/filemanager, since this - // is KFileItemDelegate. + // note that in KIconLoader terminology, active = hover. assuming that the icon group is + // desktop if (effect->hasEffect(KIconLoader::Desktop, KIconLoader::ActiveState)) { if (qFuzzyCompare(qreal(1.0), hoverAnimation->value())) { result = effect->apply(result, KIconLoader::Desktop, KIconLoader::ActiveState);