fix the hover/focus frame

This commit is contained in:
Marco Martin 2011-10-10 19:40:46 +02:00
parent 2dbc92c534
commit 0f894f9db2

View File

@ -113,13 +113,25 @@ Item {
} }
imagePath: "widgets/lineedit" imagePath: "widgets/lineedit"
prefix: { prefix: {
// XXX: missing hover state if (textField.activeFocus) {
if (textField.activeFocus) return "focus"
return "focus"; } else {
else return "hover"
return "";
} }
} }
opacity: (mouseWatcher.containsMouse||textField.activeFocus) ? 1 : 0
Behavior on opacity {
NumberAnimation {
duration: 250
easing.type: Easing.InOutQuad
}
}
}
MouseArea {
id: mouseWatcher
anchors.fill: hover
hoverEnabled: true
}
Text { Text {
anchors.fill: textInput anchors.fill: textInput