Warning, /plasma/lightdm-kde-greeter/themes/userbar/contents/ui/private/ButtonShadow.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 /**Documented API
0022 Inherits:
0023 Item
0024
0025 Imports:
0026 QtQuick 1.0
0027 org.kde.plasma.core
0028
0029 Description:
0030 TODO i need more info here
0031
0032
0033 Properties:
0034 **/
0035
0036 import QtQuick 1.0
0037 import org.kde.plasma.core 0.1 as PlasmaCore
0038
0039 Item {
0040 id: main
0041 state: parent.state
0042 //used to tell apart this implementation with the touch components one
0043 property bool hasOverState: true
0044
0045 PlasmaCore.FrameSvgItem {
0046 id: hover
0047
0048 anchors {
0049 fill: parent
0050 leftMargin: -margins.left
0051 topMargin: -margins.top
0052 rightMargin: -margins.right
0053 bottomMargin: -margins.bottom
0054 }
0055 opacity: 0
0056 imagePath: "widgets/button"
0057 prefix: "hover"
0058 }
0059
0060 PlasmaCore.FrameSvgItem {
0061 id: shadow
0062
0063 anchors {
0064 fill: parent
0065 leftMargin: -margins.left
0066 topMargin: -margins.top
0067 rightMargin: -margins.right
0068 bottomMargin: -margins.bottom
0069 }
0070 imagePath: "widgets/button"
0071 prefix: "shadow"
0072 }
0073
0074 states: [
0075 State {
0076 name: "shadow"
0077 PropertyChanges {
0078 target: shadow
0079 opacity: 1
0080 }
0081 PropertyChanges {
0082 target: hover
0083 opacity: 0
0084 prefix: "hover"
0085 }
0086 },
0087 State {
0088 name: "hover"
0089 PropertyChanges {
0090 target: shadow
0091 opacity: 0
0092 }
0093 PropertyChanges {
0094 target: hover
0095 opacity: 1
0096 prefix: "hover"
0097 }
0098 },
0099 State {
0100 name: "focus"
0101 PropertyChanges {
0102 target: shadow
0103 opacity: 0
0104 }
0105 PropertyChanges {
0106 target: hover
0107 opacity: 1
0108 prefix: "focus"
0109 }
0110 },
0111 State {
0112 name: "hidden"
0113 PropertyChanges {
0114 target: shadow
0115 opacity: 0
0116 }
0117 PropertyChanges {
0118 target: hover
0119 opacity: 0
0120 prefix: "hover"
0121 }
0122 }
0123 ]
0124
0125 transitions: [
0126 Transition {
0127 PropertyAnimation {
0128 properties: "opacity"
0129 duration: 250
0130 easing.type: Easing.OutQuad
0131 }
0132 }
0133 ]
0134 }