<table><tr><td style="">mart added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D19392">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Can you elaborate on the problem we're trying to fix.</p></blockquote>
<p>so, when we have KiconLoader (ie using the desktop style and we can rely on kf5 dependencies) to colorize icons we use our stylesheet-based color replacement in svgs and everything is always awesome: monochrome icons colorized to the color palette and clolor icons stay as they are.</p>
<p>where we can't use kiconloader due dependencies (kirigami is tier 1) which is usually Android. Or technically one can do a kirigami app with zero dependencies and not have qqc2-desktop-style installed and run it on gnome.</p>
<p>so, we colorize monochrome icons treating them as just masks, and that works ok, tough there isn't any spec to know with 100% certainty if an icon is monochrome or colored (all icon names that end up with -symbolys usually are monochrome, but in breeze and other themes monochrome icons are all over the place and often it depends from the icon size)</p>
<p>in theory all i would need is the access to the svg file and look at the styling inside, but the public QIcon/QIconloader api doesn't let me access the final resolved name of the icon file, being it a png or an svg.</p>
<p>so, the only resort that i have, is actually.. looking at the pixels in the rendering image :/<br />
so, very low entropy -> yay is monochrome, let's paint over it (the actual mask-ification shold be done by a shader ideally, but that's a completely different problem)<br />
high entropy and/or many saturated pixels -> leave it as it is and assume is a colored icon</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R169 Kirigami</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D19392">https://phabricator.kde.org/D19392</a></div></div><br /><div><strong>To: </strong>mart, Kirigami<br /><strong>Cc: </strong>davidedmundson, plasma-devel, domson, dkardarakos, apol, mart, hein<br /></div>