mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 10:22:48 +00:00
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 <xakepa10@gmail.com>
This commit is contained in:
parent
dbf44ae507
commit
7715020fd0
1 changed files with 4 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue