mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-09 00:58:15 +03:00
wayland:support PipeWire for Plasma 5.24,5.25,5.26
This commit is contained in:
parent
2e252b5420
commit
a3bdc89a0f
@ -50,7 +50,9 @@ Item {
|
||||
property bool plasma518: LatteCore.Environment.plasmaDesktopVersion >= LatteCore.Environment.makeVersion(5,18,0)
|
||||
property bool plasma520: LatteCore.Environment.plasmaDesktopVersion >= LatteCore.Environment.makeVersion(5,20,0)
|
||||
property bool plasmaGreaterThan522: LatteCore.Environment.plasmaDesktopVersion >= LatteCore.Environment.makeVersion(5,21,75)
|
||||
property bool plasmaAtLeast524: LatteCore.Environment.plasmaDesktopVersion >= LatteCore.Environment.makeVersion(5,24,0)
|
||||
property bool plasmaAtLeast525: LatteCore.Environment.plasmaDesktopVersion >= LatteCore.Environment.makeVersion(5,24,75)
|
||||
property bool plasmaAtLeast526: LatteCore.Environment.plasmaDesktopVersion >= LatteCore.Environment.makeVersion(5,25,75)
|
||||
|
||||
property bool disableRestoreZoom: false //blocks restore animation in rightClick
|
||||
property bool disableAllWindowsFunctionality: plasmoid.configuration.hideAllTasks
|
||||
|
@ -0,0 +1,39 @@
|
||||
/*
|
||||
SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
|
||||
SPDX-License-Identifier: LGPL-2.0-or-later
|
||||
*/
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Window 2.15
|
||||
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.taskmanager 0.1 as TaskManager
|
||||
|
||||
// opacity doesn't work in the root item
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
TaskManager.PipeWireSourceItem {
|
||||
id: pipeWireSourceItem
|
||||
|
||||
enabled: false // Must be set in pipewiresourceitem.cpp so opacity animation can work
|
||||
visible: waylandItem.nodeId > 0
|
||||
nodeId: waylandItem.nodeId
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
opacity: enabled ? 1 : 0
|
||||
|
||||
TaskManager.ScreencastingRequest {
|
||||
id: waylandItem
|
||||
uuid: !windowsPreviewDlg.visible ? "" : thumbnailSourceItem.winId
|
||||
}
|
||||
|
||||
/*Behavior on opacity {
|
||||
OpacityAnimator {
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
/*
|
||||
SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
|
||||
SPDX-License-Identifier: LGPL-2.0-or-later
|
||||
*/
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Window 2.15
|
||||
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.pipewire 0.1 as PipeWire
|
||||
import org.kde.taskmanager 0.1 as TaskManager
|
||||
|
||||
// opacity doesn't work in the root item
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
PipeWire.PipeWireSourceItem {
|
||||
id: pipeWireSourceItem
|
||||
|
||||
enabled: false // Must be set in pipewiresourceitem.cpp so opacity animation can work
|
||||
visible: waylandItem.nodeId > 0
|
||||
nodeId: waylandItem.nodeId
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
opacity: enabled ? 1 : 0
|
||||
|
||||
TaskManager.ScreencastingRequest {
|
||||
id: waylandItem
|
||||
uuid: !windowsPreviewDlg.visible ? "" : thumbnailSourceItem.winId
|
||||
}
|
||||
|
||||
/*Behavior on opacity {
|
||||
OpacityAnimator {
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
@ -192,7 +192,19 @@ Column {
|
||||
anchors.margins: Math.max(2, previewShadow.radius)
|
||||
active: LatteCore.WindowSystem.isPlatformX11 || (root.plasma520 && LatteCore.WindowSystem.isPlatformWayland)
|
||||
visible: !albumArtImage.visible && !thumbnailSourceItem.isMinimized
|
||||
source: root.plasma520 && LatteCore.WindowSystem.isPlatformWayland ? "PipeWireThumbnail.qml" : "PlasmaCoreThumbnail.qml"
|
||||
source: {
|
||||
if (LatteCore.WindowSystem.isPlatformWayland) {
|
||||
if (root.plasmaAtLeast526) {
|
||||
return "PipeWireThumbnail.5.26.qml";
|
||||
} else if (root.plasmaAtLeast525) {
|
||||
return "PipeWireThumbnail.5.25.qml";
|
||||
} else if (root.plasmaAtLeast524) {
|
||||
return "PipeWireThumbnail.5.24.qml";
|
||||
}
|
||||
}
|
||||
|
||||
return "PlasmaCoreThumbnail.qml";
|
||||
}
|
||||
|
||||
DropShadow {
|
||||
id: previewShadow
|
||||
|
Loading…
x
Reference in New Issue
Block a user