summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-06-12 15:04:55 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-06-12 15:04:55 +0200
commit3bc1cebfb3d67e08dc934c5090ad659e3166a79c (patch)
treea61fdf3810698cfdbf5a2a42697602c8d10854f6
parent0f3dc1273f2124269d19c0d1771447739b7a80f6 (diff)
downloadkube-3bc1cebfb3d67e08dc934c5090ad659e3166a79c.tar.gz
kube-3bc1cebfb3d67e08dc934c5090ad659e3166a79c.zip
Request the proper size, but then don't scale
-rw-r--r--framework/qml/Icon.qml14
1 files changed, 8 insertions, 6 deletions
diff --git a/framework/qml/Icon.qml b/framework/qml/Icon.qml
index 947e69ef..fa2761fc 100644
--- a/framework/qml/Icon.qml
+++ b/framework/qml/Icon.qml
@@ -23,8 +23,8 @@ Item {
23 property string iconName 23 property string iconName
24 property url iconSource 24 property url iconSource
25 property alias status: image.status 25 property alias status: image.status
26 property alias implicitWidth: image.implicitWidth 26 implicitWidth: image.implicitWidth
27 property alias implicitHeight: image.implicitHeight 27 implicitHeight: image.implicitHeight
28 28
29 onIconNameChanged: setImageSource() 29 onIconNameChanged: setImageSource()
30 30
@@ -37,11 +37,13 @@ Item {
37 37
38 Image { 38 Image {
39 id: image 39 id: image
40 anchors.fill: parent 40 anchors.centerIn: parent
41 sourceSize.width: width 41 width: image.implicitWidth
42 sourceSize.height: height 42 height: image.implicitWidth
43 sourceSize.width: root.width
44 sourceSize.height: root.height
43 cache: true 45 cache: true
44 smooth: true 46 smooth: true
45 fillMode: Image.PreserveAspectFit 47 fillMode: Image.Pad
46 } 48 }
47} 49}