diff options
Diffstat (limited to 'demos/declarative')
-rw-r--r-- | demos/declarative/flickr/flickr-mobile.qml | 17 | ||||
-rw-r--r-- | demos/declarative/flickr/mobile/GridDelegate.qml | 4 | ||||
-rw-r--r-- | demos/declarative/flickr/mobile/ImageDetails.qml | 5 |
3 files changed, 17 insertions, 9 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 { diff --git a/demos/declarative/flickr/mobile/GridDelegate.qml b/demos/declarative/flickr/mobile/GridDelegate.qml index 890e020..19369b2 100644 --- a/demos/declarative/flickr/mobile/GridDelegate.qml +++ b/demos/declarative/flickr/mobile/GridDelegate.qml @@ -44,8 +44,8 @@ PropertyChanges { target: ScaleMe; scale: 1 } }, State { - name: "Details"; extend: "Show" - //PropertyChanges { target: ImageDetails; z: 2 } + name: "Details" + PropertyChanges { target: ScaleMe; scale: 1 } ParentChange { target: Wrapper; parent: ImageDetails.frontContainer } PropertyChanges { target: Wrapper; x: 20; y: 60; z: 1000 } PropertyChanges { target: Background; state: "DetailedView" } diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml index 617fe40..c55ab50 100644 --- a/demos/declarative/flickr/mobile/ImageDetails.qml +++ b/demos/declarative/flickr/mobile/ImageDetails.qml @@ -32,11 +32,6 @@ Flipable { color: "black"; opacity: 0.4 } - Connection { - sender: ToolBar; signal: "button1Clicked()" - script: if (Container.state=='') Container.state='Back'; else Container.state='' - } - Column { spacing: 10 anchors { |