D16291: Center icons properly if size doesn't fit

2018-10-18 Thread Kai Uwe Broulik
This revision was automatically updated to reflect the committed changes.
Closed by commit R302:2699d36365fa: Center icons properly if size doesnt 
fit (authored by broulik).

REPOSITORY
  R302 KIconThemes

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D16291?vs=43847=43848

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

AFFECTED FILES
  src/kiconengine.cpp

To: broulik, dfaure, cfeck, ngraham, davidedmundson
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D16291: Center icons properly if size doesn't fit

2018-10-18 Thread David Edmundson
davidedmundson accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R302 KIconThemes

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

To: broulik, dfaure, cfeck, ngraham, davidedmundson
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D16291: Center icons properly if size doesn't fit

2018-10-18 Thread Kai Uwe Broulik
broulik updated this revision to Diff 43847.
broulik edited the test plan for this revision.
broulik added a comment.


  - Also properly create new pixmap

REPOSITORY
  R302 KIconThemes

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D16291?vs=43845=43847

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

AFFECTED FILES
  src/kiconengine.cpp

To: broulik, dfaure, cfeck, ngraham
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D16291: Center icons properly if size doesn't fit

2018-10-18 Thread Kai Uwe Broulik
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