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
This commit is contained in:
Luis Büchi 2024-05-13 18:44:11 +02:00
parent 887e7a9b66
commit 63e228237f
3 changed files with 2 additions and 13 deletions

View file

@ -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

View file

@ -54,7 +54,6 @@ Flickable {
if (dragging) {
taskSwitcherHelpers.cancelAnimations();
} else {
taskSwitcherHelpers.scrollingTasks = false;
resetPosition();
}
}

View file

@ -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();
}
}