Warning, /plasma/latte-dock/declarativeimports/components/private/TextFieldFocus.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2011 Daker Fernandes Pinheiro <dakerfp@gmail.com>
0003     SPDX-FileCopyrightText: 2011 Marco Martin <mart@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 import QtQuick 2.1
0009 import org.kde.plasma.core 2.0 as PlasmaCore
0010 
0011 Item {
0012     id: main
0013     state: parent.state
0014 
0015     PlasmaCore.Svg {
0016         id: lineEditSvg
0017         imagePath: "widgets/lineedit"
0018         onRepaintNeeded: {
0019             if (lineEditSvg.hasElement("hint-focus-over-base")) {
0020                 main.z = 800
0021             } else {
0022                 main.z = 0
0023             }
0024         }
0025         Component.onCompleted: {
0026             if (lineEditSvg.hasElement("hint-focus-over-base")) {
0027                 main.z = 800
0028             } else {
0029                 main.z = 0
0030             }
0031         }
0032     }
0033 
0034     PlasmaCore.FrameSvgItem {
0035         id: hover
0036 
0037         anchors {
0038             fill: parent
0039             leftMargin: -margins.left
0040             topMargin: -margins.top
0041             rightMargin: -margins.right
0042             bottomMargin: -margins.bottom
0043         }
0044         opacity: 0
0045         imagePath: "widgets/lineedit"
0046         prefix: "hover"
0047     }
0048 
0049     states: [
0050         State {
0051             name: "hover"
0052             PropertyChanges {
0053                 target: hover
0054                 opacity: 1
0055                 prefix: "hover"
0056             }
0057         },
0058         State {
0059             name: "focus"
0060             PropertyChanges {
0061                 target: hover
0062                 opacity: 1
0063                 prefix: "focus"
0064             }
0065         },
0066         State {
0067             name: "hidden"
0068             PropertyChanges {
0069                 target: hover
0070                 opacity: 0
0071                 prefix: "hover"
0072             }
0073         }
0074     ]
0075 
0076     transitions: [
0077         Transition {
0078             PropertyAnimation {
0079                 properties: "opacity"
0080                 duration: units.longDuration
0081                 easing.type: Easing.OutQuad
0082             }
0083         }
0084     ]
0085 }