Render application icon at paintdevice DPR
ClosedPublic

Authored by davidedmundson on Feb 21 2018, 1:31 PM.

Details

Summary

QIcon::pixmap doesn't know anything about the paint device currently
being used so uses qApp->devicePixelRatio.
This works in systemsettings, but not in kwin and we get a standard
resolution pixmap returned.

We can't manually multiply by painter->device->dpr because then system
settings would get scaled twice.

QIcon::paint solves that in a way that won't break should kwin's
qApp->dpr change. Also it's IMHO cleaner as it does the alignment
internally.

BUG: 390639

Test Plan

System settings look the same
Icon in kwin deco is crisper than before

Diff Detail

Repository
R31 Breeze
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Feb 21 2018, 1:31 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 21 2018, 1:31 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Feb 21 2018, 1:31 PM
mart accepted this revision.Feb 21 2018, 1:33 PM
This revision is now accepted and ready to land.Feb 21 2018, 1:33 PM
This revision was automatically updated to reflect the committed changes.