Enable anti-aliasing for user avatars
ClosedPublic

Authored by ktatunov on Apr 23 2018, 1:32 PM.

Details

Summary

By default, QT uses fast transformations when scaling pixmaps but it results in a very pixelated image. This patch fixes it for avatars in the user manager module.

Test Plan

Resolution of the original avatar image is 256x256.
Before:


After:

Diff Detail

Repository
R128 User Manager
Lint
Lint Skipped
Unit
Unit Tests Skipped
ktatunov created this revision.Apr 23 2018, 1:32 PM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 23 2018, 1:32 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ktatunov requested review of this revision.Apr 23 2018, 1:32 PM

why ignore aspect ratio?

why ignore aspect ratio?

I kept the default behaviour for this argument since it wasn't what I was after. But now that you mention it it would probably be better to use Qt::KeepAspectRatio. I don't think anyone likes their avatars stretched/squashed.
Shall I change it to that?

davidedmundson accepted this revision.Apr 23 2018, 2:28 PM

I think so.

Then ship it!

This revision is now accepted and ready to land.Apr 23 2018, 2:28 PM
ktatunov updated this revision to Diff 32890.Apr 23 2018, 2:37 PM

Qt::IgnoreAspectRatio -> Qt::KeepAspectRatio

Could someone commit this for me please? I don't have a developer account.

This revision was automatically updated to reflect the committed changes.