mart created this revision.
mart added a reviewer: Kirigami.
Herald added a project: Kirigami.
Herald added a subscriber: plasma-devel.
mart requested review of this revision.

REVISION SUMMARY
  since we can't directly access the svg file, when we can't use
  KIconLoader try to detect monochrome icons on the actual image
  with the following heuristic:
  
  - less than 30% of pixels with high saturation
  - the Shannon entropy of the distribution of gray values of the
  
  non transparent pixels is less than 0.3
  this seems to give satisfying results with most icon temes

TEST PLAN
  tested with breeze, oxygen adwayta and some other themes from ghns

REPOSITORY
  R169 Kirigami

BRANCH
  mart/iconentropyheuristic

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

AFFECTED FILES
  src/controls/BasicListItem.qml
  src/desktopicon.cpp
  src/desktopicon.h
  src/libkirigami/platformtheme.cpp
  src/libkirigami/platformtheme.h

To: mart, #kirigami
Cc: plasma-devel, domson, dkardarakos, apol, davidedmundson, mart, hein

Reply via email to