D16291: Center icons properly if size doesn't fit

Kai Uwe Broulik noreply at phabricator.kde.org
Thu Oct 18 09:08:42 BST 2018


broulik created this revision.
broulik added reviewers: dfaure, cfeck, ngraham.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
broulik requested review of this revision.

REVISION SUMMARY
  When requesting an icon size that cannot be served, the pixmap is centered in the requested size.
  By using the original pixmap's device pixel ratio we ensure the padded pixmap is painted correctly.
  
  BUG: 396990

TEST PLAN
  There's still various issues in Dolphin's view engine when using fractional scaling, such as icons being too small, or preview icons larger then file icons, etc but at least icons aren't cut-off and misaligned anymore.
  I don't fully understand why for SVGs it fails to get a properly sized pixmap and instead pads them but that's fractional scaling for you right there...
  
  - deleted icon cache in `~/.cache`, ran `QT_SCREEN_SCALE_FACTORS=1.4 dolphin`, no longer have icons rendered out of bounds

REPOSITORY
  R302 KIconThemes

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

AFFECTED FILES
  src/kiconengine.cpp

To: broulik, dfaure, cfeck, ngraham
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181018/b17ef269/attachment.html>


More information about the Kde-frameworks-devel mailing list