on xenial help sign in
Notifications: shaped icon was stretching the icon instead of respecting its aspect ratio and filling the whole shape.
commit976b9aa55e8212a42039050b03caafda99dd5258 authorFlorian Boucault <florian.boucault@canonical.com> dateFri 1 May 2015, 14:34 (11 years ago) parent30d9174
1 file changed+5−4
qml/Notifications/ShapedIcon.qml+5−4
qml/Notifications/ShapedIcon.qml+5−4
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.3
18+import Ubuntu.Components 1.2
1919
2020Item {
2121 property string fileSource
@@ -25,7 +25,8 @@ Item {
2525 objectName: "shapedIcon"
2626 anchors.fill: parent
2727 visible: shaped
28− image: realImage
28+ source: realImage
29+ sourceFillMode: UbuntuShape.PreserveAspectCrop
2930 }
3031
3132 Image {
@@ -35,6 +36,6 @@ Item {
3536 anchors.fill: parent
3637 visible: !shaped
3738 source: fileSource
38− fillMode: Image.PreserveAspectFit
39+ fillMode: Image.PreserveAspectCrop
3940 }
4041}