psa: Added AddFeed dialog
[feedingit] / psa_harmattan / feedingit / qml / TextInputClear.qml
1 import QtQuick 1.0
2 import com.nokia.meego 1.0
3
4 Item {
5     anchors {left: parent.left; right: parent.right}
6     height: custom.height
7     property string placeHolder: ""
8     property alias text: custom.text
9
10 //    Rectangle {
11 //        id: suggestionBubble
12 //        radius: 10
13 //        color: "lightgrey"
14 //        anchors {left: parent.left; right: custom.right; bottom: custom.top; bottomMargin:5}
15 //        height: 100
16
17 //        visible: custom.activeFocus
18
19 //        Text {
20 //            font.pointSize: 14
21 //            color: "darkgrey"
22 //            anchors {fill: parent; margins: 10}
23 //            wrapMode: "Wrap"
24 //            text: "Enter a URL (http:// or https://) or a search term: \n" /* + custom.text*/
25 //        }
26 //    }
27
28     TextField {
29         id: custom
30         anchors {left: parent.left; right: parent.right; rightMargin: 10}
31
32         placeholderText: parent.placeHolder
33         platformStyle: TextFieldStyle { paddingRight: clearButton.width }
34         Image {
35             id: clearButton
36             anchors.right: parent.right
37             anchors.verticalCenter: parent.verticalCenter
38             source: "image://theme/icon-m-input-clear"
39             MouseArea {
40                 anchors.fill: parent
41                 onClicked: {
42                     inputContext.reset();
43                     custom.text = "";
44                 }
45             }
46         }
47     }
48 }