diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-20 08:33:57 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-20 08:33:57 (GMT) |
commit | c0a02f5c67d3de5e16fd506df83fef968e09c798 (patch) | |
tree | 53643122e75a4d549159a9ec6000aa5b6c4a1e03 /examples/declarative/aspectratio/scale_to_fit_simple.qml | |
parent | 86529642cfdc5cc5a94b735042d0807e3b57e9e1 (diff) | |
parent | 3182e16fa31a7def9775375971bea203af419d76 (diff) | |
download | Qt-c0a02f5c67d3de5e16fd506df83fef968e09c798.zip Qt-c0a02f5c67d3de5e16fd506df83fef968e09c798.tar.gz Qt-c0a02f5c67d3de5e16fd506df83fef968e09c798.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'examples/declarative/aspectratio/scale_to_fit_simple.qml')
-rw-r--r-- | examples/declarative/aspectratio/scale_to_fit_simple.qml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/declarative/aspectratio/scale_to_fit_simple.qml b/examples/declarative/aspectratio/scale_to_fit_simple.qml new file mode 100644 index 0000000..4f89586 --- /dev/null +++ b/examples/declarative/aspectratio/scale_to_fit_simple.qml @@ -0,0 +1,17 @@ +// Here, we implement "Scale to Fit" behaviour, using the +// preserveAspect property. +// +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 + } +} |