• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kde-runtime API Reference
  • KDE Home
  • Contact Us
 

PlasmaComponents

  • sources
  • kde-4.14
  • kde-runtime
  • plasma
  • declarativeimports
  • plasmacomponents
  • qml
  • private
ButtonShadow.qml
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011 by Daker Fernandes Pinheiro <dakerfp@gmail.com>
3  * Copyright (C) 2011 by Marco Martin <mart@kde.org>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU Library General Public License as
7  * published by the Free Software Foundation; either version 2, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Library General Public License for more details
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this program; if not, write to the
17  * Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
36 import QtQuick 1.0
37 import org.kde.plasma.core 0.1 as PlasmaCore
38 
39 Item {
40  id: main
41  state: parent.state
42  //used to tell apart this implementation with the touch components one
43  property bool hasOverState: true
44 
45  PlasmaCore.FrameSvgItem {
46  id: hover
47 
48  anchors {
49  fill: parent
50  leftMargin: -margins.left
51  topMargin: -margins.top
52  rightMargin: -margins.right
53  bottomMargin: -margins.bottom
54  }
55  opacity: 0
56  imagePath: "widgets/button"
57  prefix: "hover"
58  }
59 
60  PlasmaCore.FrameSvgItem {
61  id: shadow
62 
63  anchors {
64  fill: parent
65  leftMargin: -margins.left
66  topMargin: -margins.top
67  rightMargin: -margins.right
68  bottomMargin: -margins.bottom
69  }
70  imagePath: "widgets/button"
71  prefix: "shadow"
72  }
73 
74  states: [
75  State {
76  name: "shadow"
77  PropertyChanges {
78  target: shadow
79  opacity: 1
80  }
81  PropertyChanges {
82  target: hover
83  opacity: 0
84  prefix: "hover"
85  }
86  },
87  State {
88  name: "hover"
89  PropertyChanges {
90  target: shadow
91  opacity: 0
92  }
93  PropertyChanges {
94  target: hover
95  opacity: 1
96  prefix: "hover"
97  }
98  },
99  State {
100  name: "focus"
101  PropertyChanges {
102  target: shadow
103  opacity: 0
104  }
105  PropertyChanges {
106  target: hover
107  opacity: 1
108  prefix: "focus"
109  }
110  },
111  State {
112  name: "hidden"
113  PropertyChanges {
114  target: shadow
115  opacity: 0
116  }
117  PropertyChanges {
118  target: hover
119  opacity: 0
120  prefix: "hover"
121  }
122  }
123  ]
124 
125  transitions: [
126  Transition {
127  PropertyAnimation {
128  properties: "opacity"
129  duration: 250
130  easing.type: Easing.OutQuad
131  }
132  }
133  ]
134 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:08:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

PlasmaComponents

Skip menu "PlasmaComponents"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List

kde-runtime API Reference

Skip menu "kde-runtime API Reference"
  • KCMShell
  • KNotify
  • Plasma Runtime
  •     PlasmaCore
  •     DragAndDrop
  •     PlasmaComponents
  •     PlasmaExtraComponents
  •     QtExtraComponents

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal