diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-08-31 02:30:54 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-08-31 02:30:54 (GMT) |
commit | cb9ce64d9a233f6c53b5961cfe637ccc2ac6fa69 (patch) | |
tree | 3d15ea3814d4d54d9352d814f363855c7421d500 /examples/declarative/anchors | |
parent | 671c3ac47a258a876352a4c4d38937e0fb7034a7 (diff) | |
download | Qt-cb9ce64d9a233f6c53b5961cfe637ccc2ac6fa69.zip Qt-cb9ce64d9a233f6c53b5961cfe637ccc2ac6fa69.tar.gz Qt-cb9ce64d9a233f6c53b5961cfe637ccc2ac6fa69.tar.bz2 |
anchor-changes
Diffstat (limited to 'examples/declarative/anchors')
-rw-r--r-- | examples/declarative/anchors/anchor-changes.qml | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/examples/declarative/anchors/anchor-changes.qml b/examples/declarative/anchors/anchor-changes.qml index 0c62791..37a33ff 100644 --- a/examples/declarative/anchors/anchor-changes.qml +++ b/examples/declarative/anchors/anchor-changes.qml @@ -5,32 +5,38 @@ Item { width: 200; height: 450 Rectangle { - id: Red; color: "Red" - anchors.top: parent.top; height: 150 + id: TitleBar; color: "Gray" + anchors.top: parent.top; height: 50 width: parent.width } Rectangle { - id: Orange; color: "Orange" - anchors.top: Red.bottom; anchors.bottom: Green.top + id: StatusBar; color: "Gray" + height: 50; anchors.bottom: parent.bottom width: parent.width } Rectangle { - id: Green; color: "Green" - height: 150; anchors.bottom: parent.bottom + id: Content + anchors.top: TitleBar.bottom; anchors.bottom: StatusBar.top width: parent.width + + Text { text: "Top"; anchors.top: parent.top } + Text { text: "Bottom"; anchors.bottom: parent.bottom } } MouseRegion { anchors.fill: parent - onPressed: Window.state = "Pressed" + onPressed: Window.state = "FullScreen" onReleased: Window.state = "" } states : State { - name: "Pressed" - PropertyChanges { target: Orange; color: "Yellow" } - AnchorChanges { target: Orange; top: Window.top; bottom: Window.bottom } + name: "FullScreen" + AnchorChanges { target: Content; top: Window.top; bottom: Window.bottom } + } + + transitions : Transition { + NumberAnimation { properties: "y,height" } } } |