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,12 +113,24 @@ Item {
}
imagePath: "widgets/lineedit"
prefix: {
// XXX: missing hover state
if (textField.activeFocus)
return "focus";
else
return "";
if (textField.activeFocus) {
return "focus"
} else {
return "hover"
}
}
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 {