diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-05-08 02:37:27 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-05-08 02:37:27 (GMT) |
commit | 32df312db7c2088002c734a49cf9cc13b334af6e (patch) | |
tree | 7d422673b4a994c95878850bd00c5e8df2d02d06 /demos | |
parent | 54e7c7d8990a792e7f5bb4429dd48fba108ba24a (diff) | |
download | Qt-32df312db7c2088002c734a49cf9cc13b334af6e.zip Qt-32df312db7c2088002c734a49cf9cc13b334af6e.tar.gz Qt-32df312db7c2088002c734a49cf9cc13b334af6e.tar.bz2 |
Minimal size is MediaButton size, center outside edit mode
Diffstat (limited to 'demos')
-rw-r--r-- | demos/declarative/flickr/content/MediaLineEdit.qml | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/demos/declarative/flickr/content/MediaLineEdit.qml b/demos/declarative/flickr/content/MediaLineEdit.qml index 28618e8..37caf24 100644 --- a/demos/declarative/flickr/content/MediaLineEdit.qml +++ b/demos/declarative/flickr/content/MediaLineEdit.qml @@ -4,7 +4,7 @@ Item { property string label property string text - width: Label.width + Editor.width + 20 + width: Math.max(94,Label.width + Editor.width + 20) height: Image.height states: [ @@ -14,6 +14,11 @@ Item { target: Label text: Container.label + ": " } + SetProperty { + target: Label + property: "x" + binding: 10 + } SetProperties { target: Editor cursorVisible: true @@ -36,13 +41,7 @@ Item { ] transitions: [ Transition { - ParallelAnimation { - NumericAnimation { properties: "width"; duration: 500; easing: "easeInOutQuad" } - SequentialAnimation { - PauseAnimation { duration: 100 } - SetPropertyAction { properties: "text" } - } - } + NumericAnimation { properties: "x,width"; duration: 500; easing: "easeInOutQuad" } } ] @@ -82,8 +81,7 @@ Item { font.bold: true color: "white" anchors.verticalCenter: Container.verticalCenter - anchors.left: Container.left - anchors.leftMargin: 10 + x: (Container.width - width)/2 text: Container.label + "..." } |