When initialize devicePixelRatio when rendering into a pixmap
AbandonedPublic

Authored by apol on Feb 9 2018, 8:40 PM.

Details

Reviewers
davidedmundson
Group Reviewers
Plasma
Summary

Plasma::Svg uses this information to know the pixel density.
Fixes rendering of svg in many places, for example now icons don't look
pixelated in the system tray when using a fancy high dpi display.

Test Plan

Manual testing

Diff Detail

Repository
R242 Plasma Framework (Library)
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
apol created this revision.Feb 9 2018, 8:40 PM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptFeb 9 2018, 8:40 PM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
apol requested review of this revision.Feb 9 2018, 8:40 PM
apol added a comment.Feb 9 2018, 9:00 PM

This breaks the rendering of buttons (exclusively, as long as I've seen), any idea why?

davidedmundson requested changes to this revision.Feb 9 2018, 11:52 PM
davidedmundson added a subscriber: davidedmundson.

Fixes rendering of svg in many places, for example now icons don't look

By editing FrameSVG? That seems unlikely.

I think you've got some results mixed up.

This patch doesn't change the resolution of anything. QPixmap::setDPR just sets metadata used when rendering using the sizes of one paint device when painting into another. However here we don't use the pixmap size, we use frame->frameSize...and then multiply it by the devicePixelRatio anyway on line 793.

This revision now requires changes to proceed.Feb 9 2018, 11:52 PM