Support fractional scaling in generating the sidebar preview
ClosedPublic

Authored by davidedmundson on Jun 6 2017, 10:06 PM.

Details

Summary

QPaintDevice::devicePixelRatio was replaced by devicePixelRatioF when Qt
supported fractional scaling as the type changed but needed to keep API.
Every other call to devicePixelRatio was already a qreal.

The sidebar was already scaled up to the fractional size, but the pixmap
was generated at the integer version. End result is that it wasn't quite as
crisp as it could be.

Test Plan

QT_SCALE_FACTOR=1.4 kate
Opened bug fix and used minimap as before
My extra assert in QPaintDevice::devicePixelRatio was never fired

Diff Detail

Repository
R39 KTextEditor
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.Jun 6 2017, 10:06 PM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptJun 6 2017, 10:06 PM
Restricted Application added subscribers: Frameworks, kwrite-devel, plasma-devel. · View Herald Transcript
apol added a subscriber: apol.Jun 6 2017, 10:16 PM

+1 would it make sense to add a clazy check that identifies uses of this method? Or deprecating the method altogether?

This revision was automatically updated to reflect the committed changes.