Ensure DesktopIcon paints with the correct aspect ratio
ClosedPublic

Authored by leinir on Jan 11 2018, 12:23 PM.

Details

Summary

The simple QML based Icon already provides this correctly, but DesktopIcon would not output in the correct location and aspect ratio, and rather draw the image scaled into the entirety of the node rectangle.

This fixes the issue described in https://bugs.kde.org/show_bug.cgi?id=388737

Test Plan

Without this patch, Discover shows items as seen in the attachment on the bug

With this patch, the output is as expected (with the correct aspect ratio and centered in the item)

Diff Detail

Repository
R169 Kirigami
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
leinir created this revision.Jan 11 2018, 12:23 PM
Restricted Application added a subscriber: plasma-devel. · View Herald TranscriptJan 11 2018, 12:23 PM
leinir requested review of this revision.Jan 11 2018, 12:23 PM

Shows the updated output:

apol added a subscriber: apol.Jan 11 2018, 2:40 PM

+1 tested, seems to work for me, bug seems fixed.

Remember to add the BUG: 388737 tag in the commit message!

mart accepted this revision.Jan 12 2018, 3:15 PM
This revision is now accepted and ready to land.Jan 12 2018, 3:15 PM
This revision was automatically updated to reflect the committed changes.

You are my hero. Awesome

When you have a really long or wide image will it be croped?

apol added a comment.Jan 13 2018, 12:48 AM

You are my hero. Awesome

When you have a really long or wide image will it be croped?

No, it will show empty space on the sides.