diff options
author | Sebastian Kügler <sebas@kde.org> | 2015-11-29 22:12:49 +0100 |
---|---|---|
committer | Sebastian Kügler <sebas@kde.org> | 2015-11-29 22:13:52 +0100 |
commit | e0fc5268fe308d8f60ee96bb2c03c49a5fa4a524 (patch) | |
tree | facf89c519b7d22817432576d0001340a24d0bea | |
parent | ffb2c6014efa0df2548f5c432e741023fcc69a72 (diff) | |
download | subsurface-e0fc5268fe308d8f60ee96bb2c03c49a5fa4a524.tar.gz |
Sync with mobilecomponents 54e4f2622a
This fixes loading the icon.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
-rw-r--r-- | qt-mobile/qml/mobilecomponents/Icon.qml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/qt-mobile/qml/mobilecomponents/Icon.qml b/qt-mobile/qml/mobilecomponents/Icon.qml index d5b253235..b28624dbf 100644 --- a/qt-mobile/qml/mobilecomponents/Icon.qml +++ b/qt-mobile/qml/mobilecomponents/Icon.qml @@ -19,6 +19,7 @@ import QtQuick 2.0 import QtGraphicalEffects 1.0 +import org.kde.plasma.mobilecomponents 0.2 Item { id: root @@ -26,13 +27,13 @@ Item { property alias smooth: image.smooth property bool active: false property bool valid: image.status == Image.Ready - implicitWidth: image.sourceSize.width - implicitHeight: image.sourceSize.height + implicitWidth: Math.min(image.sourceSize.width, Units.iconSizes.medium) + implicitHeight: Math.min(image.sourceSize.height, Units.iconSizes.medium) Image { id: image anchors.fill: parent - source: root.source != "" ? "icons/" + root.source + ".svg" : root.source + source: root.source != "" ? (root.source.indexOf(".") === -1 ? "icons/" + root.source + ".svg" : root.source) : root.source } GammaAdjust { anchors.fill: image |