diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-09-30 05:07:31 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-09-30 05:07:31 (GMT) |
commit | 93cc34771020518e34009d8111bfaf312a50798b (patch) | |
tree | eb2e613524b16d55fb7d41958dbb8a56f97096a1 /demos | |
parent | 4dc235f50a686d40bc63d7108027145f23d2c18a (diff) | |
download | Qt-93cc34771020518e34009d8111bfaf312a50798b.zip Qt-93cc34771020518e34009d8111bfaf312a50798b.tar.gz Qt-93cc34771020518e34009d8111bfaf312a50798b.tar.bz2 |
Fix small bugs in flick-mobile
Diffstat (limited to 'demos')
-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 { |