From 63e228237fbed9886fd820a7fefd7e070a0d372e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20B=C3=BCchi?= Date: Mon, 13 May 2024 18:44:11 +0200 Subject: [PATCH] remove QML debugging flag, remove unused scrollingTasks variable scrollingTasks was not hooked up, if we want to reintroduce it in the future let's do so properly instead of keeping it around half-dead and broken --- kwin/mobiletaskswitcher/CMakeLists.txt | 2 -- kwin/mobiletaskswitcher/qml/FlickContainer.qml | 1 - kwin/mobiletaskswitcher/qml/TaskSwitcherHelpers.qml | 12 ++---------- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/kwin/mobiletaskswitcher/CMakeLists.txt b/kwin/mobiletaskswitcher/CMakeLists.txt index b5633b50..97462847 100644 --- a/kwin/mobiletaskswitcher/CMakeLists.txt +++ b/kwin/mobiletaskswitcher/CMakeLists.txt @@ -8,8 +8,6 @@ target_sources(mobiletaskswitcher PRIVATE effecttouchborder.cpp ) -target_compile_definitions(mobiletaskswitcher PRIVATE QT_QML_DEBUG) - target_link_libraries(mobiletaskswitcher KF6::ConfigGui KF6::GlobalAccel diff --git a/kwin/mobiletaskswitcher/qml/FlickContainer.qml b/kwin/mobiletaskswitcher/qml/FlickContainer.qml index 47bbd522..0bbc21ad 100644 --- a/kwin/mobiletaskswitcher/qml/FlickContainer.qml +++ b/kwin/mobiletaskswitcher/qml/FlickContainer.qml @@ -54,7 +54,6 @@ Flickable { if (dragging) { taskSwitcherHelpers.cancelAnimations(); } else { - taskSwitcherHelpers.scrollingTasks = false; resetPosition(); } } diff --git a/kwin/mobiletaskswitcher/qml/TaskSwitcherHelpers.qml b/kwin/mobiletaskswitcher/qml/TaskSwitcherHelpers.qml index f5501d0d..ffb99d6b 100644 --- a/kwin/mobiletaskswitcher/qml/TaskSwitcherHelpers.qml +++ b/kwin/mobiletaskswitcher/qml/TaskSwitcherHelpers.qml @@ -33,13 +33,6 @@ QtObject { // yPosition threshold below which opening the task switcher should be undone and returned to the previously active task readonly property real undoYThreshold: openedYPosition / 3 - // ~~ active state ~~ - - // whether we are in a swipe left/right gesture to walk through tasks - property bool scrollingTasks: false - // TODO! we're not using this anymore and when I hooked it up again it just produced broken-looking visuals - // I don't even know what this was *supposed* to do in the past, so I don't know how to fix it. I'd just remove it altogether - // ~~ measurement constants ~~ // dimensions of a real window on the screen @@ -81,10 +74,10 @@ QtObject { let finalScale = Math.min(maxScale, maxScale - subtract); // animate scale only if we are *not* opening from the homescreen - if ((root.state.wasInActiveTask || !root.state.gestureInProgress) && !scrollingTasks) { + if (root.state.wasInActiveTask || !root.state.gestureInProgress) { return finalScale; } - return scrollingTasks ? maxScale : 1; + return 1; } readonly property bool isScaleClamped: root.state.yPosition > openedYPosition @@ -231,7 +224,6 @@ QtObject { easing.type: Easing.InOutQuad onFinished: { root.state.status = stateClass.Inactive; - scrollingTasks = false; taskSwitcher.instantHide(); } }