on xenial help sign in
CardHeader mascot improvements.
commit717bc2a4a090f115ac552b069dd97348e992ddcf authorMichał Karnicki <michal.karnicki@canonical.com> dateTue 4 Feb 2014, 14:07 (13 years ago) parentb09affa3a4fda4
1 file changed+9−3
qml/Dash/CardHeader.qml+9−3
qml/Dash/CardHeader.qml+9−3
@@ -40,13 +40,19 @@ 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+
52+ sourceSize { width: mascotShape.maxSize; height: mascotShape.maxSize }
53+ fillMode: Image.PreserveAspectCrop
54+ horizontalAlignment: Image.AlignHCenter
55+ verticalAlignment: Image.AlignVCenter
5056 }
5157 }
5258