don't scale when we are in AA_UseHighDpiPixmaps
AbandonedPublic

Authored by mart on Mar 11 2019, 3:44 PM.

Details

Reviewers
None
Group Reviewers
Plasma
Frameworks
Summary

when the flag AA_UseHighDpiPixmaps is set, the pixmap is already scaled,
no need to scale it twice.
the code calling virtual_hook in QIcon calls it with the following
ScaledPixmapArgument:
scalePixmapArg = { size * devicePixelRatio, mode, state, devicePixelRatio, QPixmap() }
The requested pixmap size is already scaled, counting devicePixelRatio
again will result in a pixmap scaled two times.

BUG:397106

Test Plan

Icons in apps with fractional scaling look a lot better

Diff Detail

Repository
R302 KIconThemes
Branch
phab/iconRendering
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 9505
Build 9523: arc lint + arc unit
mart created this revision.Mar 11 2019, 3:44 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMar 11 2019, 3:44 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
mart requested review of this revision.Mar 11 2019, 3:44 PM
mart added a comment.EditedMar 11 2019, 3:45 PM

Dolphin, before/after


Systemsettings, before

Systemsettings, after

mart edited the summary of this revision. (Show Details)Mar 11 2019, 3:46 PM
mart added a reviewer: Frameworks.
fvogt added a subscriber: fvogt.Mar 11 2019, 3:59 PM
bruns added a subscriber: bruns.Mar 11 2019, 7:04 PM

Sweet, this makes so many things look a little bit better.

I'm confused. Doesnt this undo the use of @2x icons and return to the old behavior of just loading a larger icon?

mart added a comment.Mar 12 2019, 12:11 PM

I'm confused. Doesnt this undo the use of @2x icons and return to the old behavior of just loading a larger icon?

hmm, perhaps, so probablythat check is to be done in kiconloader itself

mart updated this revision to Diff 53727.Mar 12 2019, 12:27 PM
  • don reset the scale that gets passed around
mart updated this revision to Diff 53740.Mar 12 2019, 4:51 PM
  • scale the size for lookup on KIconThemePrivate::iconPath
mart added a comment.Mar 12 2019, 4:53 PM

latest version loads again correctly stuff from @2 icon dirs, still, only on integer scaling, as it was doing before (wether that behavior is to be changedis another topic)

mart abandoned this revision.Apr 4 2019, 3:54 PM