Fluid 1.3.0
Material Design for QtQuick and Qml
Loading...
Searching...
No Matches
ElevationRectangle.qml
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
2// SPDX-FileCopyrightText: 2024-2025 hypengw <hypengwip@gmail.com>
3// SPDX-License-Identifier: MPL-2.0
4//
5// Originally based on code by hypengw, licensed under the MIT license.
6
7import QtQuick
8import Fluid as MD
9
20Rectangle {
21 id: root
22 Accessible.ignored: true
23
25 property alias elevation: shadow.elevation
26
28 property alias elevationItem: shadow
29
31 property alias elevationVisible: shadow.visible
32
33 MD.Elevation {
34 id: shadow
35
36 z: -1
37
38 radius: root.radius
39 topLeftRadius: root.topLeftRadius
40 topRightRadius: root.topRightRadius
41 bottomLeftRadius: root.bottomLeftRadius
42 bottomRightRadius: root.bottomRightRadius
43
44 width: root.width
45 height: root.height
46
47 visible: !MD.Utils.epsilonEqual(elevation, MD.Tokens.elevation.level0) && root.color.a > 0
48 }
49}