4 property alias image: image.source
5 property alias text: text.text
7 property int textSingleLineHeight: 0
9 anchors.left: parent.left
10 anchors.right: parent.right
11 width: childrenRect.width
12 height: text.height > image.height ? text.height : image.height
18 anchors { left: parent.left; top: parent.top }
23 anchors { leftMargin: 5; left: image.right; right: parent.right; top: parent.top }
24 font.pixelSize: image.height * 0.7
26 elide: Text.ElideRight
29 id: textHeightBehavior
30 NumberAnimation { duration: 150 }
34 Component.onCompleted: {
35 textSingleLineHeight = text.height
51 height: textSingleLineHeight
61 PropertyAction { target: textHeightBehavior; property: "enabled"; value: true }
62 PropertyAction { target: text; property: "wrapMode"; value: Text.Wrap }
63 PropertyAction { target: text; property: "elide"; value: Text.ElideNone }
70 PropertyAction { target: textHeightBehavior; property: "enabled"; value: false }
71 NumberAnimation { target: text; properties: "height"; duration: 150 }
72 PropertyAction { target: text; property: "wrapMode"; value: Text.NoWrap }
73 PropertyAction { target: text; property: "elide"; value: Text.ElideRight }