[Differential] [Commented On] D3892: [Icon Item] Support non-square icons
davidedmundson (David Edmundson)
noreply at phabricator.kde.org
Tue Jan 3 13:24:25 UTC 2017
davidedmundson 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)
Copying a better explanation of the bug here from on IRC:
[13:09] <d_ed> kbroulik: assuming the standard icon sizes are 16,32,48 if I have an icon that is 48x45 your paintedSize will return 48x32
[13:12] <d_ed>and your unit test currently only passes because roundToIcon size has a code path of if size > KIconLoader::SizeHuge return size
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/20170103/ad36e801/attachment.html>
More information about the Plasma-devel
mailing list