[Differential] [Changed Subscribers] D3892: [Icon Item] Support non-square icons

mart (Marco Martin) noreply at phabricator.kde.org
Mon Jan 2 10:11:54 UTC 2017


mart added inline comments.

INLINE COMMENTS

> davidedmundson wrote in iconitem.cpp:325
> This makes no sense.
> You can't round it to icon sizes *after* scaling, it means the shorter size is always just wrong.
> 
> If we do merge this patch, you want:
> 
> m_iconPixmap.size().scaled(QSize(Units.roundtoIconSize(actualContainerSize.width), Units.roundToIconSize(actualContainerSize.height)

the final size should be:
the *biggest* between width and height should be rounded to icon size
the other dimension should be scaled accordingly keeping the same proportions, so for example, if the original is
200*100 pixels, and you paint of a 32x32 icon canvas, the final image should be 32x16 (possibly painted centered)

REPOSITORY
  R242 Plasma Frameworks

REVISION DETAIL
  https://phabricator.kde.org/D3892

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: broulik, #plasma, hein
Cc: mart, davidedmundson, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170102/05c8c5f1/attachment.html>


More information about the Plasma-devel mailing list