Warning, /plasma/plasma-desktop/applets/taskmanager/package/contents/ui/PipeWireThumbnail.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
0003
0004 SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006
0007 import QtQuick 2.15
0008 import QtQuick.Window 2.15
0009
0010 import org.kde.pipewire 0.1 as PipeWire
0011 import org.kde.taskmanager 0.1 as TaskManager
0012 import org.kde.kirigami 2.20 as Kirigami
0013
0014 // opacity doesn't work in the root item
0015 Item {
0016 anchors.fill: parent
0017
0018 readonly property alias hasThumbnail: pipeWireSourceItem.enabled
0019
0020 TaskManager.ScreencastingRequest {
0021 id: waylandItem
0022 uuid: thumbnailSourceItem.winId
0023 }
0024
0025 PipeWire.PipeWireSourceItem {
0026 id: pipeWireSourceItem
0027
0028 enabled: false // Must be set in pipewiresourceitem.cpp so opacity animation can work
0029 visible: waylandItem.nodeId > 0
0030 nodeId: waylandItem.nodeId
0031
0032 anchors.fill: parent
0033
0034 opacity: enabled ? 1 : 0
0035
0036 Behavior on opacity {
0037 OpacityAnimator {
0038 duration: Kirigami.Units.shortDuration
0039 easing.type: Easing.OutCubic
0040 }
0041 }
0042 }
0043 }