diff --git a/components/mobileshell/qml/taskswitcher/Task.qml b/components/mobileshell/qml/taskswitcher/Task.qml index d1f67ae9..6e53f8a4 100644 --- a/components/mobileshell/qml/taskswitcher/Task.qml +++ b/components/mobileshell/qml/taskswitcher/Task.qml @@ -76,9 +76,13 @@ Item { DragHandler { id: dragHandler target: parent + yAxis.enabled: true xAxis.enabled: false yAxis.maximum: 0 + + // y > 0 - dragging down (opening the app) + // y < 0 - dragging up (dismissing the app) onActiveChanged: { yAnimator.stop(); @@ -194,16 +198,18 @@ Item { contentItem: Item { id: item + // app icon (behind window preview in-case it doesn't load) + TaskIcon { + anchors.centerIn: parent + } + + // attempt to load window preview Loader { id: pipeWireLoader anchors.fill: parent source: Qt.resolvedUrl("./Thumbnail.qml") - onStatusChanged: { - if (status === Loader.Error) { - source = Qt.resolvedUrl("./TaskIcon.qml"); - } - } } + TapHandler { onTapped: delegate.activateApp() } diff --git a/components/mobileshell/qml/taskswitcher/TaskIcon.qml b/components/mobileshell/qml/taskswitcher/TaskIcon.qml index 592d48b2..1668bd44 100644 --- a/components/mobileshell/qml/taskswitcher/TaskIcon.qml +++ b/components/mobileshell/qml/taskswitcher/TaskIcon.qml @@ -10,8 +10,8 @@ import QtQuick.Layouts 1.1 import org.kde.plasma.core 2.0 as PlasmaCore PlasmaCore.IconItem { - implicitWidth: PlasmaCore.Units.iconSizes.medium - implicitHeight: PlasmaCore.Units.iconSizes.medium + implicitWidth: PlasmaCore.Units.iconSizes.enormous + implicitHeight: PlasmaCore.Units.iconSizes.enormous usesPlasmaTheme: false source: model.decoration } diff --git a/components/mobileshell/qml/taskswitcher/TaskSwitcher.qml b/components/mobileshell/qml/taskswitcher/TaskSwitcher.qml index fdca9841..05fc13a4 100644 --- a/components/mobileshell/qml/taskswitcher/TaskSwitcher.qml +++ b/components/mobileshell/qml/taskswitcher/TaskSwitcher.qml @@ -164,19 +164,11 @@ Item { taskSwitcherState: root.taskSwitcherState // the item is effectively anchored to the flickable bounds - QQC2.Control { - leftPadding: 0 - rightPadding: 0 - topPadding: 0 - bottomPadding: 0 - + TaskList { + taskSwitcher: root x: flickable.contentX width: flickable.width height: flickable.height - - contentItem: TaskList { - taskSwitcher: root - } } } }