Warning, /plasma/lightdm-kde-greeter/themes/userbar/contents/ui/private/TextFieldFocus.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 * Copyright (C) 2011 by Daker Fernandes Pinheiro <dakerfp@gmail.com>
0003 * Copyright (C) 2011 by Marco Martin <mart@kde.org>
0004 *
0005 * This program is free software; you can redistribute it and/or modify
0006 * it under the terms of the GNU Library General Public License as
0007 * published by the Free Software Foundation; either version 2, or
0008 * (at your option) any later version.
0009 *
0010 * This program is distributed in the hope that it will be useful,
0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0013 * GNU Library General Public License for more details
0014 *
0015 * You should have received a copy of the GNU Library General Public
0016 * License along with this program; if not, write to the
0017 * Free Software Foundation, Inc.,
0018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0019 */
0020
0021 import QtQuick 1.0
0022 import org.kde.plasma.core 0.1 as PlasmaCore
0023
0024 Item {
0025 id: main
0026 state: parent.state
0027
0028 PlasmaCore.Svg {
0029 id: lineEditSvg
0030 imagePath: "widgets/lineedit"
0031 onRepaintNeeded: {
0032 if (lineEditSvg.hasElement("hint-focus-over-base")) {
0033 main.z = 800
0034 } else {
0035 main.z = 0
0036 }
0037 }
0038 Component.onCompleted: {
0039 if (lineEditSvg.hasElement("hint-focus-over-base")) {
0040 main.z = 800
0041 } else {
0042 main.z = 0
0043 }
0044 }
0045 }
0046
0047 PlasmaCore.FrameSvgItem {
0048 id: hover
0049
0050 anchors {
0051 fill: parent
0052 leftMargin: -margins.left
0053 topMargin: -margins.top
0054 rightMargin: -margins.right
0055 bottomMargin: -margins.bottom
0056 }
0057 opacity: 0
0058 imagePath: "widgets/lineedit"
0059 prefix: "hover"
0060 }
0061
0062 states: [
0063 State {
0064 name: "hover"
0065 PropertyChanges {
0066 target: hover
0067 opacity: 1
0068 prefix: "hover"
0069 }
0070 },
0071 State {
0072 name: "focus"
0073 PropertyChanges {
0074 target: hover
0075 opacity: 1
0076 prefix: "focus"
0077 }
0078 },
0079 State {
0080 name: "hidden"
0081 PropertyChanges {
0082 target: hover
0083 opacity: 0
0084 prefix: "hover"
0085 }
0086 }
0087 ]
0088
0089 transitions: [
0090 Transition {
0091 PropertyAnimation {
0092 properties: "opacity"
0093 duration: 250
0094 easing.type: Easing.OutQuad
0095 }
0096 }
0097 ]
0098 }