diff options
Diffstat (limited to 'qt-mobile/qml/mobilecomponents/Icon.qml')
-rw-r--r-- | qt-mobile/qml/mobilecomponents/Icon.qml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qt-mobile/qml/mobilecomponents/Icon.qml b/qt-mobile/qml/mobilecomponents/Icon.qml index b28624dbf..59cfaf054 100644 --- a/qt-mobile/qml/mobilecomponents/Icon.qml +++ b/qt-mobile/qml/mobilecomponents/Icon.qml @@ -27,13 +27,16 @@ Item { property alias smooth: image.smooth property bool active: false property bool valid: image.status == Image.Ready - implicitWidth: Math.min(image.sourceSize.width, Units.iconSizes.medium) - implicitHeight: Math.min(image.sourceSize.height, Units.iconSizes.medium) + + implicitWidth: image.source != "" ? Units.iconSizes.smallMedium : 0 + implicitHeight: image.source != "" ? Units.iconSizes.smallMedium : 0 Image { id: image anchors.fill: parent source: root.source != "" ? (root.source.indexOf(".") === -1 ? "icons/" + root.source + ".svg" : root.source) : root.source + sourceSize.width: root.width + sourceSize.height: root.height } GammaAdjust { anchors.fill: image |