diff --git a/declarativeimports/plasmacomponents/qml/TextArea.qml b/declarativeimports/plasmacomponents/qml/TextArea.qml index f3a7a3471..839b75a1b 100644 --- a/declarativeimports/plasmacomponents/qml/TextArea.qml +++ b/declarativeimports/plasmacomponents/qml/TextArea.qml @@ -89,6 +89,38 @@ Item { opacity: enabled ? 1.0 : 0.5 + PlasmaCore.FrameSvgItem { + id: hover + + anchors { + fill: base + leftMargin: -margins.left + topMargin: -margins.top + rightMargin: -margins.right + bottomMargin: -margins.bottom + } + imagePath: "widgets/lineedit" + prefix: { + if (textEdit.activeFocus) + return "focus"; + else + return "hover"; + } + + opacity: (mouseWatcher.containsMouse||textArea.activeFocus) ? 1 : 0 + Behavior on opacity { + NumberAnimation { + duration: 250 + easing.type: Easing.InOutQuad + } + } + } + MouseArea { + id: mouseWatcher + anchors.fill: hover + hoverEnabled: true + } + PlasmaCore.FrameSvgItem { id: base @@ -102,26 +134,6 @@ Item { } imagePath: "widgets/lineedit" prefix: "base" - - PlasmaCore.FrameSvgItem { - id: hover - - anchors { - fill: parent - leftMargin: -margins.left - topMargin: -margins.top - rightMargin: -margins.right - bottomMargin: -margins.bottom - } - imagePath: "widgets/lineedit" - prefix: { - // XXX: missing hover state - if (textEdit.activeFocus) - return "focus"; - else - return ""; - } - } } Flickable {