Kirigami2

EdgeShadow.qml
1 /*
2  * SPDX-FileCopyrightText: 2016 Marco Martin <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.0-or-later
5  */
6 
7 import QtQuick 2.1
8 import QtGraphicalEffects 1.0 as GE
9 import org.kde.kirigami 2.4 as Kirigami
10 
11 GE.LinearGradient {
12  id: shadow
13  /**
14  * @brief This property holds the edge of the shadow that will determine the direction of the gradient.
15  * The acceptable values are:
16  * * ``Qt.TopEdge``: the top edge of the content item.
17  * * ``Qt.LeftEdge``: the left edge of the content item
18  * * ``Qt.RightEdge``: the right edge of the content item.
19  * * ``Qt.BottomEdge``: the bottom edge of the content item.
20  *
21  * @see Qt::Edges
22  */
23  property int edge: Qt.LeftEdge
24 
25  property int radius: Kirigami.Units.gridUnit
26  implicitWidth: radius
27  implicitHeight: radius
28 
29  start: Qt.point((edge !== Qt.RightEdge ? 0 : width), (edge !== Qt.BottomEdge ? 0 : height))
30  end: Qt.point((edge !== Qt.LeftEdge ? 0 : width), (edge !== Qt.TopEdge ? 0 : height))
31  gradient: Gradient {
32  GradientStop {
33  position: 0.0
34  color: Qt.rgba(0, 0, 0, 0.25)
35  }
36  GradientStop {
37  position: 0.20
38  color: Qt.rgba(0, 0, 0, 0.1)
39  }
40  GradientStop {
41  position: 0.35
42  color: Qt.rgba(0, 0, 0, 0.02)
43  }
44  GradientStop {
45  position: 1.0
46  color: "transparent"
47  }
48  }
49 }
50 
Q_SCRIPTABLE Q_NOREPLY void start()
const QList< QKeySequence > & end()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:14:23 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.