TextField polishing

- remove call to closeSoftwareInputPanel before calling it, it's removed
  from TextInput in commit
3721de405e
I suppose it now "just works", but will test. The API is not there,
anyway, so it's safe to remove.
- clearbutton only shows when enabled
- clearbutton rightmargin
This commit is contained in:
Sebastian Kügler 2013-02-20 00:26:33 +01:00
parent 5d1717fcfa
commit 4e82cc5d3d
2 changed files with 2 additions and 12 deletions

View File

@ -393,11 +393,6 @@ Item {
color: theme.buttonTextColor color: theme.buttonTextColor
opacity: 0.5 opacity: 0.5
} }
onActiveFocusChanged: {
if (!textEdit.activeFocus) {
textEdit.closeSoftwareInputPanel()
}
}
} }
} }

View File

@ -350,11 +350,6 @@ FocusScope {
enabled: textField.enabled enabled: textField.enabled
clip: true clip: true
focus: true focus: true
onActiveFocusChanged: {
if (!textField.activeFocus) {
textInput.closeSoftwareInputPanel()
}
}
onAccepted: textField.accepted() onAccepted: textField.accepted()
Keys.forwardTo: textField Keys.forwardTo: textField
} }
@ -364,7 +359,7 @@ FocusScope {
source: "edit-clear-locationbar-rtl" source: "edit-clear-locationbar-rtl"
height: Math.max(textInput.height, theme.smallIconSize) height: Math.max(textInput.height, theme.smallIconSize)
width: height width: height
opacity: (textInput.text != "" && clearButtonShown) ? 1 : 0 opacity: (textInput.text != "" && clearButtonShown && textField.enabled) ? 1 : 0
Behavior on opacity { Behavior on opacity {
NumberAnimation { NumberAnimation {
duration: 250 duration: 250
@ -373,7 +368,7 @@ FocusScope {
} }
anchors { anchors {
right: parent.right right: parent.right
rightMargin: y rightMargin: 6
verticalCenter: textInput.verticalCenter verticalCenter: textInput.verticalCenter
} }
MouseArea { MouseArea {