summaryrefslogtreecommitdiffstats
path: root/examples/declarative/anchors/anchor-changes.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/anchors/anchor-changes.qml')
-rw-r--r--examples/declarative/anchors/anchor-changes.qml26
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" }
}
}