Warning, /plasma/plasma-workspace/components/workspace/BadgeOverlay.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2016 Kai Uwe Broulik <kde@privat.broulik.de>
0003     SPDX-FileCopyrightText: 2016 Marco Martin <mart@kde.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 import QtQuick 2.15
0009 import QtGraphicalEffects 1.15
0010 
0011 import org.kde.plasma.components 3.0 as PlasmaComponents3
0012 import org.kde.plasma.core 2.1 as PlasmaCore
0013 
0014 Rectangle {
0015     property alias text: label.text
0016     property Item icon
0017 
0018     color: PlasmaCore.ColorScope.backgroundColor
0019     width: Math.max(PlasmaCore.Units.gridUnit, label.width + PlasmaCore.Units.devicePixelRatio * 2)
0020     height: label.height
0021     radius: PlasmaCore.Units.devicePixelRatio * 3
0022     opacity: 0.9
0023 
0024     PlasmaComponents3.Label {
0025         id: label
0026         anchors.centerIn: parent
0027         font.pixelSize: Math.max(icon.height / 4, PlasmaCore.Theme.smallestFont.pixelSize * 0.8)
0028     }
0029 
0030     layer.enabled: true
0031     layer.effect: DropShadow {
0032         horizontalOffset: 0
0033         verticalOffset: 0
0034         radius: PlasmaCore.Units.devicePixelRatio * 2
0035         samples: radius * 2
0036         color: Qt.rgba(0, 0, 0, 0.5)
0037     }
0038 }