summaryrefslogtreecommitdiffstats
path: root/demos/declarative/flickr/flickr-mobile.qml
diff options
context:
space:
mode:
Diffstat (limited to 'demos/declarative/flickr/flickr-mobile.qml')
-rw-r--r--demos/declarative/flickr/flickr-mobile.qml17
1 files changed, 15 insertions, 2 deletions
diff --git a/demos/declarative/flickr/flickr-mobile.qml b/demos/declarative/flickr/flickr-mobile.qml
index 9d2a3fb..32f3e37 100644
--- a/demos/declarative/flickr/flickr-mobile.qml
+++ b/demos/declarative/flickr/flickr-mobile.qml
@@ -53,13 +53,26 @@ Item {
onButton2Clicked: if (Screen.inListView == true) Screen.inListView = false; else Screen.inListView = true
}
+ Connection {
+ sender: ImageDetails; signal: "closed()"
+ script: {
+ if (Background.state == "DetailedView") {
+ Background.state = '';
+ ImageDetails.photoUrl = "";
+ }
+ }
+ }
+
states: State {
name: "DetailedView"
PropertyChanges { target: Views; x: -parent.width }
PropertyChanges { target: ToolBar; button1Label: "More..." }
- PropertyChanges { target: ToolBar; onButton1Clicked: { } }
+ PropertyChanges {
+ target: ToolBar
+ onButton1Clicked: if (ImageDetails.state=='') ImageDetails.state='Back'; else ImageDetails.state=''
+ }
PropertyChanges { target: ToolBar; button2Label: "Back" }
- PropertyChanges { target: ToolBar; onButton2Clicked: { } }
+ PropertyChanges { target: ToolBar; onButton2Clicked: ImageDetails.closed() }
}
transitions: Transition {