From 32df312db7c2088002c734a49cf9cc13b334af6e Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 8 May 2009 12:37:27 +1000 Subject: Minimal size is MediaButton size, center outside edit mode --- demos/declarative/flickr/content/MediaLineEdit.qml | 18 ++++++++---------- 1 file 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 + "..." } -- cgit v0.12