[KIconLoader] Take into account devicePixelRatio for overlays
ClosedPublic

Authored by broulik on Jan 11 2018, 11:05 AM.

Details

Summary

Keeps them from being painted outside view and scales them with the image they're supposed to be painted on.

Test Plan

Originally posted as https://git.reviewboard.kde.org/r/129083/

The network share overlay issue I mentioned in https://git.reviewboard.kde.org/r/129084/ is moot as it's just KFileItem using a wrong (as in non emblem) icon for that

@emmanuelp suggested changing int to real and use QPointF but you cannot have half pixels, so I didn't update the patch

Diff Detail

Repository
R302 KIconThemes
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Jan 11 2018, 11:05 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptJan 11 2018, 11:05 AM
broulik requested review of this revision.Jan 11 2018, 11:05 AM
apol added a subscriber: apol.Feb 15 2018, 12:20 PM

+1 looks sensible.

apol accepted this revision.Feb 15 2018, 12:24 PM
This revision is now accepted and ready to land.Feb 15 2018, 12:24 PM
src/kiconloader.cpp
542

Typically it's a lot easier to do everything in logical co-ordinates, rather than effectively convert co-ordinates to device pixels and then convert back. Especially if you ever mix up paint devices with different ratios.

But in this case it works...so ship it.

This revision was automatically updated to reflect the committed changes.