// SPDX-FileCopyrightText: 2024 Oliver Beard // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL // // Taken from plasma-welcome's private mocks. The original highlighted the // active applet with the theme's tabbar through KSvg; KOutNet has no Plasma // theme to resolve that through, so the highlight is drawn here instead, as a // rounded overlay in the theme's colours. import QtQuick import koutnet.app import org.kde.kirigami as Kirigami Item { id: applet property bool active: false implicitHeight: 44 // Default panel height // Styled after System Tray icons - the implementation for panel // applets does not currently use animations so this looks better Rectangle { anchors.fill: parent radius: Kirigami.Units.smallSpacing color: Qt.rgba(AppPalette.text.r, AppPalette.text.g, AppPalette.text.b, 0.12) opacity: active ? 1 : 0 visible: opacity > 0 Behavior on opacity { NumberAnimation { duration: Kirigami.Units.longDuration easing.type: active ? Easing.OutCubic : Easing.InCubic } } } }