broulik created this revision. broulik added a reviewer: Plasma. broulik set the repository for this revision to R242 Plasma Frameworks. Restricted Application added projects: Plasma, Frameworks. Restricted Application added subscribers: Frameworks, plasma-devel.
REVISION SUMMARY The old code was connecting the KIconLoader signal to implicitWidth/HeightChanged but never actually set a new implicit size. Also, while at it use "setImplicitSize" - it's also marke internal but public like setSize and uses qreal instead of QSizeF. TEST PLAN Comes with a unit test Also ran the following in qml scene and changed settings, the icon item would adjust itself: import QtQuick 2.2 import org.kde.plasma.core 2.0 as PlasmaCore Item { width: 500 height: 500 PlasmaCore.IconItem { source: "user-home" } } I wonder if we shouldn't scale the implicit size with Units REPOSITORY R242 Plasma Frameworks REVISION DETAIL https://phabricator.kde.org/D4011 AFFECTED FILES autotests/iconitemtest.cpp autotests/iconitemtest.h src/declarativeimports/core/iconitem.cpp src/declarativeimports/core/iconitem.h EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: broulik, #plasma Cc: plasma-devel, #frameworks, lesliezhai, ali-mohamed, jensreuterberg, abetts, andreaska, sebas