diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-07-20 02:11:42 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-07-20 02:11:42 (GMT) |
commit | aff973dfb0d43c32c0686017498ea2ab03d585ae (patch) | |
tree | c85dfe6f6ab053d9d14ebbad86c38dbebf9c150f /examples/declarative/aspectratio | |
parent | 341f47a31d6d98e402547c77ccbe358465f8b1a9 (diff) | |
download | Qt-aff973dfb0d43c32c0686017498ea2ab03d585ae.zip Qt-aff973dfb0d43c32c0686017498ea2ab03d585ae.tar.gz Qt-aff973dfb0d43c32c0686017498ea2ab03d585ae.tar.bz2 |
Make identical to non-simple example.
Diffstat (limited to 'examples/declarative/aspectratio')
-rw-r--r-- | examples/declarative/aspectratio/scale_to_fit_simple.qml | 17 |
1 files 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 + } } |