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:
parent
5d1717fcfa
commit
4e82cc5d3d
@ -393,11 +393,6 @@ Item {
|
||||
color: theme.buttonTextColor
|
||||
opacity: 0.5
|
||||
}
|
||||
onActiveFocusChanged: {
|
||||
if (!textEdit.activeFocus) {
|
||||
textEdit.closeSoftwareInputPanel()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -350,11 +350,6 @@ FocusScope {
|
||||
enabled: textField.enabled
|
||||
clip: true
|
||||
focus: true
|
||||
onActiveFocusChanged: {
|
||||
if (!textField.activeFocus) {
|
||||
textInput.closeSoftwareInputPanel()
|
||||
}
|
||||
}
|
||||
onAccepted: textField.accepted()
|
||||
Keys.forwardTo: textField
|
||||
}
|
||||
@ -364,7 +359,7 @@ FocusScope {
|
||||
source: "edit-clear-locationbar-rtl"
|
||||
height: Math.max(textInput.height, theme.smallIconSize)
|
||||
width: height
|
||||
opacity: (textInput.text != "" && clearButtonShown) ? 1 : 0
|
||||
opacity: (textInput.text != "" && clearButtonShown && textField.enabled) ? 1 : 0
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 250
|
||||
@ -373,7 +368,7 @@ FocusScope {
|
||||
}
|
||||
anchors {
|
||||
right: parent.right
|
||||
rightMargin: y
|
||||
rightMargin: 6
|
||||
verticalCenter: textInput.verticalCenter
|
||||
}
|
||||
MouseArea {
|
||||
|
Loading…
Reference in New Issue
Block a user