Warning, /plasma/plasma-systemmonitor/src/page/PlaceholderRectangle.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  * SPDX-FileCopyrightText: 2020 Arjen Hiemstra <ahiemstra@heimr.nl>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005  */
0006 
0007 import QtQuick
0008 
0009 import org.kde.kirigami as Kirigami
0010 
0011 Kirigami.ShadowedRectangle {
0012     id: rectangle
0013 
0014     property bool highlight: false
0015     signal clicked()
0016 
0017     property var baseColor: highlight ? Kirigami.Theme.highlightColor : Kirigami.Theme.alternateBackgroundColor
0018 
0019     color: Qt.rgba(baseColor.r, baseColor.g, baseColor.b, 0.25)
0020     Behavior on color { ColorAnimation { duration: Kirigami.Units.shortDuration } }
0021 
0022     border.width: 1
0023     border.color: baseColor
0024     Behavior on border.color { ColorAnimation { duration: Kirigami.Units.shortDuration } }
0025 
0026     radius: Kirigami.Units.smallSpacing
0027 
0028     shadow.yOffset: 2
0029     shadow.color: Qt.rgba(0, 0, 0, 0.5)
0030     Behavior on shadow.size { NumberAnimation { duration: Kirigami.Units.shortDuration } }
0031 
0032     MouseArea {
0033         anchors.fill: parent;
0034         onClicked: rectangle.clicked()
0035     }
0036 }