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