Libplasma

ButtonShadow.qml
1/*
2 SPDX-FileCopyrightText: 2011 Daker Fernandes Pinheiro <dakerfp@gmail.com>
3 SPDX-FileCopyrightText: 2011 Marco Martin <mart@kde.org>
4 SPDX-FileCopyrightText: 2020 Noah Davis <noahadvs@gmail.com>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9import QtQuick
10import org.kde.ksvg as KSvg
11import org.kde.kirigami as Kirigami
12
13KSvg.FrameSvgItem {
14 id: shadowEffect
15
16 property bool showShadow
17
18 anchors {
19 fill: parent
20 leftMargin: -margins.left
21 topMargin: -margins.top
22 rightMargin: -margins.right
23 bottomMargin: -margins.bottom
24 }
25 imagePath: "widgets/button"
26 prefix: "shadow"
27
28 opacity: showShadow ? 1 : 0
29 Behavior on opacity {
30 enabled: Kirigami.Units.shortDuration > 0
31 OpacityAnimator { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutQuad }
32 }
33}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:34:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.