on xenial help sign in
Fix mascot size and Image properties.
commit4f7ad513150388c9139cdfbb403a42aeba9f7617 authorMichał Karnicki <michal.karnicki@canonical.com> dateThu 30 Jan 2014, 14:09 (13 years ago) parent2276f60
1 file changed+10−3
qml/Dash/CardHeader.qml+10−3
qml/Dash/CardHeader.qml+10−3
@@ -40,13 +40,20 @@ Item {
4040 id: mascotShape
4141 objectName: "mascotShape"
4242
43− width: units.gu(8)
44− height: units.gu(8)
43+ // TODO karni: Icon aspect-ratio is 8:7.5. Revisit these values to avoid fraction of pixels.
44+ width: units.gu(6)
45+ height: units.gu(5.625)
4546 visible: image.status === Image.Ready
47+ readonly property int maxSize: Math.max(width, height)
4648
4749 image: Image {
4850 id: mascotImage
49− sourceSize { width: mascotShape.width; height: mascotShape.height }
51+ sourceSize {
52+ width: mascotShape.maxSize
53+ height: mascotShape.maxSize
54+ }
55+ fillMode: Image.PreserveAspectCrop
56+ horizontalAlignment: Image.AlignHCenter
5057 }
5158 }
5259