/* SPDX-FileCopyrightText: 2011 Daker Fernandes Pinheiro SPDX-FileCopyrightText: 2011 Marco Martin SPDX-License-Identifier: LGPL-2.0-or-later */ import QtQuick 2.1 import org.kde.plasma.core 2.0 as PlasmaCore Item { id: main state: parent.state PlasmaCore.Svg { id: lineEditSvg imagePath: "widgets/lineedit" onRepaintNeeded: { if (lineEditSvg.hasElement("hint-focus-over-base")) { main.z = 800 } else { main.z = 0 } } Component.onCompleted: { if (lineEditSvg.hasElement("hint-focus-over-base")) { main.z = 800 } else { main.z = 0 } } } PlasmaCore.FrameSvgItem { id: hover anchors { fill: parent leftMargin: -margins.left topMargin: -margins.top rightMargin: -margins.right bottomMargin: -margins.bottom } opacity: 0 imagePath: "widgets/lineedit" prefix: "hover" } states: [ State { name: "hover" PropertyChanges { target: hover opacity: 1 prefix: "hover" } }, State { name: "focus" PropertyChanges { target: hover opacity: 1 prefix: "focus" } }, State { name: "hidden" PropertyChanges { target: hover opacity: 0 prefix: "hover" } } ] transitions: [ Transition { PropertyAnimation { properties: "opacity" duration: units.longDuration easing.type: Easing.OutQuad } } ] }