summaryrefslogtreecommitdiffstats
path: root/examples/qml-compositor
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-05-05 11:16:14 +0200
committerJørgen Lind <jorgen.lind@nokia.com>2011-05-05 11:16:14 +0200
commit01b7b10503dc6514502fde6161f79a0a7c3c9dc9 (patch)
treec7db322e4986e119c4e47769e5fcedb2900dac59 /examples/qml-compositor
parent6283167ff75a6abf02ed02e2d0ffe8e5f599c9b6 (diff)
Make qmal compositor resize
Diffstat (limited to 'examples/qml-compositor')
-rw-r--r--examples/qml-compositor/main.cpp1
-rw-r--r--examples/qml-compositor/qml/QmlCompositor/main.qml6
2 files changed, 5 insertions, 2 deletions
diff --git a/examples/qml-compositor/main.cpp b/examples/qml-compositor/main.cpp
index c406d581b..ece42da7f 100644
--- a/examples/qml-compositor/main.cpp
+++ b/examples/qml-compositor/main.cpp
@@ -60,6 +60,7 @@ public:
QmlCompositor() : WaylandCompositor(this) {
setMouseTracking(true);
setSource(QUrl(QLatin1String("qml/QmlCompositor/main.qml")));
+ setResizeMode(QSGView::SizeRootObjectToView);
winId();
if (platformWindow()) {
platformWindow()->glContext();
diff --git a/examples/qml-compositor/qml/QmlCompositor/main.qml b/examples/qml-compositor/qml/QmlCompositor/main.qml
index b65d71284..a82327f8e 100644
--- a/examples/qml-compositor/qml/QmlCompositor/main.qml
+++ b/examples/qml-compositor/qml/QmlCompositor/main.qml
@@ -49,8 +49,7 @@ Item {
Image {
id: background
- width: parent.width
- height: parent.height
+ anchors.fill: parent
source: "background.jpg"
smooth: true
}
@@ -95,4 +94,7 @@ Item {
windowContainer.destroy();
compositor.destroyWindow(window);
}
+
+ onHeightChanged: CompositorLogic.relayout();
+ onWidthChanged: CompositorLogic.relayout();
}