<table><tr><td style="">broulik created this revision.<br />broulik added reviewers: Plasma, hein.<br />Restricted Application added projects: Plasma, Frameworks.<br />Restricted Application added subscribers: Frameworks, plasma-devel.<br />broulik requested review of this revision.
</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/D9812" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>We have a special case for sources starting with "file://" but a "/" also represents an absolute path and shouldn't conflict with icon theme names.<br />
Kicker sets a custom image as local path and then we would end up trying to load it as a <tt style="background: #ebebeb; font-size: 13px;">QIcon::fromTheme</tt> eventually.<br />
This will cause the implicit size of the icon item to stay at its default as we only check a custom implicit size for a source <tt style="background: #ebebeb; font-size: 13px;">QImage</tt> or an SVG. Moreover, this potentially introduces scaling artefacts.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Unit test still passes. Comes with a new unit test to verify that non-square images get their proper implicit size set both when loaded as URL and local path. Fails before, passes with this fix.</p>
<p>Kicker showing proper non-square icon again<br />
<a href="https://phabricator.kde.org/F5637456" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">F5637456: Screenshot_20180111_103945.png</a></p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R242 Plasma Framework (Library)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D9812" rel="noreferrer">https://phabricator.kde.org/D9812</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/data/test_nonsquare.png<br />
autotests/iconitemtest.cpp<br />
autotests/iconitemtest.h<br />
src/declarativeimports/core/iconitem.cpp</div></div></div><br /><div><strong>To: </strong>broulik, Plasma, hein<br /><strong>Cc: </strong>plasma-devel, Frameworks, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>