summaryrefslogtreecommitdiffstats
path: root/util/qt3d/modeltweak/qml/ModelViewport.qml
diff options
context:
space:
mode:
Diffstat (limited to 'util/qt3d/modeltweak/qml/ModelViewport.qml')
-rw-r--r--util/qt3d/modeltweak/qml/ModelViewport.qml15
1 files changed, 13 insertions, 2 deletions
diff --git a/util/qt3d/modeltweak/qml/ModelViewport.qml b/util/qt3d/modeltweak/qml/ModelViewport.qml
index 2dc2d31e..66a30bd1 100644
--- a/util/qt3d/modeltweak/qml/ModelViewport.qml
+++ b/util/qt3d/modeltweak/qml/ModelViewport.qml
@@ -2,11 +2,13 @@ import QtQuick 1.0
import Qt3D 1.0
Rectangle {
- width: parent.width/2;
- height: parent.height/2
+ width: isBig ? parent.width : parent.width/2;
+ height: isBig ? parent.height : parent.height/2
color: parent.color
border.color: parent.border.color
+ property bool isBig: false;
+
property alias itemPosition: mainItem.position;
property alias itemScale: mainItem.scale;
property alias camera: viewport.camera
@@ -121,4 +123,13 @@ Rectangle {
// clear the current mouse button upon release
onReleased: { mouseDown = Qt.NoButton }
}
+ Image {
+ anchors.top: parent.top
+ anchors.right: parent.right
+ source: parent.isBig ? "Shrink.png" : "Grow.png"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: isBig = !isBig
+ }
+ }
}