[KStandardItemListWidget] Round to icon size before applying scaling
ClosedPublic

Authored by broulik on Sep 4 2018, 7:03 AM.

Details

Summary

Otherwise for 22px icons on high dpi we will request either the wrong icons or scale them needlessly.
Dolphin requests a pixmap of 22px, this is then multiplied by dpr resulting in 44 which isn't a valid icon size (only 32 or 48 are). Moreover, we will also hit the path where it will scale the pixmap to a proper icon size resulting in blurry icons (and a performance penalty).

Test Plan

stable branch
Before


After

Diff Detail

Repository
R318 Dolphin
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.Sep 4 2018, 7:03 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptSep 4 2018, 7:03 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
broulik requested review of this revision.Sep 4 2018, 7:03 AM
ngraham accepted this revision.Sep 5 2018, 4:10 AM

A big improvement! Works great and doesn't seem to cause any regressions that I could detect in either 1x or 2x. Fractional scaling is still broken due to https://bugs.kde.org/show_bug.cgi?id=396990, of course. While you're fixing HiDPI stuff, wanna take a look at that one?

This revision is now accepted and ready to land.Sep 5 2018, 4:10 AM
This revision was automatically updated to reflect the committed changes.