summaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/mobilecomponents/Icon.qml
diff options
context:
space:
mode:
authorGravatar Sebastian Kügler <sebas@kde.org>2015-12-08 02:32:03 +0100
committerGravatar Sebastian Kügler <sebas@kde.org>2015-12-08 04:55:56 +0100
commit44fd9bff6776de3a7b66e8b33412a554551c50c3 (patch)
tree08bb00645c69fe4683cfbb4f9593bb479ad02d24 /qt-mobile/qml/mobilecomponents/Icon.qml
parent946cc5fec2bc17e1a31856571e1715c0d22230a8 (diff)
downloadsubsurface-44fd9bff6776de3a7b66e8b33412a554551c50c3.tar.gz
sync with mobilecomponents f4d5d19fc
- Kills a warning in ContextDrawer. - Improves sizing of menu icons. - Fixes icon rendering in menues. Signed-off-by: Sebastian Kügler <sebas@kde.org>
Diffstat (limited to 'qt-mobile/qml/mobilecomponents/Icon.qml')
-rw-r--r--qt-mobile/qml/mobilecomponents/Icon.qml7
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