[Differential] [Request, 51 lines] D4011: [Icon Item] Fix updating implicit size when icon sizes change

broulik (Kai Uwe Broulik) noreply at phabricator.kde.org
Sun Jan 8 11:24:54 UTC 2017


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170108/44f2fd48/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list