D6313: WIP: Support device pixel ratio in icon loader and engine

Kai Uwe Broulik noreply at phabricator.kde.org
Wed Jun 21 13:13:27 UTC 2017


broulik created this revision.
Restricted Application added projects: Plasma, Frameworks.
Restricted Application added subscribers: Frameworks, plasma-devel.

REVISION SUMMARY
  Since Qt 5.9 there's a ScaledPixmapHook in QIconEngine which is called when device pixel ratio is > 1 and it wants a scaled pixmap. In contrast to regular pixmap this also knows the scale factor.
  
  This way, when a 32px icon is requested, we can now tell whether we want a 16px scaled 2x or if it's a legitimate 32px request. It ensures that we keep symbolic small icons even on high-dpi screens where we would otherwise load the colorful and hard-to-see icons at the given physical size they ends up at.

TEST PLAN
  Ran `QT_SCREEN_SCALE_FACTORS=3 kate`:
  Before:
  F3789197: Screenshot_20170621_151044.png <https://phabricator.kde.org/F3789197>
  After:
  F3789196: Screenshot_20170621_144649.png <https://phabricator.kde.org/F3789196>
  
  Before:
  F3789201: Screenshot_20170621_151140.png <https://phabricator.kde.org/F3789201>
  After:
  F3789199: Screenshot_20170621_151118.png <https://phabricator.kde.org/F3789199>

REPOSITORY
  R302 KIconThemes

REVISION DETAIL
  https://phabricator.kde.org/D6313

AFFECTED FILES
  src/kiconengine.cpp
  src/kiconengine.h
  src/kiconloader.cpp
  src/kiconloader.h

To: broulik, kde-frameworks-devel, #plasma, #vdg
Cc: plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170621/2be2d0b0/attachment.html>


More information about the Plasma-devel mailing list