From aff973dfb0d43c32c0686017498ea2ab03d585ae Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Mon, 20 Jul 2009 12:11:42 +1000 Subject: Make identical to non-simple example. --- .../declarative/aspectratio/scale_to_fit_simple.qml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/examples/declarative/aspectratio/scale_to_fit_simple.qml b/examples/declarative/aspectratio/scale_to_fit_simple.qml index ae2be83..4f89586 100644 --- a/examples/declarative/aspectratio/scale_to_fit_simple.qml +++ b/examples/declarative/aspectratio/scale_to_fit_simple.qml @@ -1,8 +1,17 @@ // Here, we implement "Scale to Fit" behaviour, using the // preserveAspect property. // -Image { - id: Image - source: "pics/face.png" - preserveAspect: true +Rect { + // default size: whole image, unscaled + width: Image.width + height: Image.height + color: "gray" + clip: true + + Image { + id: Image + source: "pics/face.png" + preserveAspect: true + anchors.fill: parent + } } -- cgit v0.12