D11319: [KStandardItemListWidget] Avoid needless image resizing
Kai Uwe Broulik
noreply at phabricator.kde.org
Wed Mar 21 11:03:48 GMT 2018
broulik added inline comments.
INLINE COMMENTS
> davidedmundson wrote in kstandarditemlistwidget.cpp:1380
> This is overly complex.
>
> We have the pixmap at size in device pixels (logical size * DPR)
>
> When we divide back to logical pixels, we lose resolution. So....don't.
>
> You can do it all in device pixels, which is the part that's relevant here.
>
> if (m_scaledPixmapSize * pixmap.devicePixelRatio != pixmap.size()) {
>
> }
Even if I do it here, I still get cases where requested size `QSize(256, 192)` is off by one pixel to `QSize(257, 192)`
I think the `scale(Qt::KeepAspectRatio)` causes rounding errors... somewhere.
REPOSITORY
R318 Dolphin
REVISION DETAIL
https://phabricator.kde.org/D11319
To: broulik, #dolphin, elvisangelaccio, davidedmundson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180321/33f59b86/attachment.htm>
More information about the kfm-devel
mailing list