diff --git a/kwin/mobiletaskswitcher/qml/TaskSwitcher.qml b/kwin/mobiletaskswitcher/qml/TaskSwitcher.qml index 4c97605a..8155a797 100644 --- a/kwin/mobiletaskswitcher/qml/TaskSwitcher.qml +++ b/kwin/mobiletaskswitcher/qml/TaskSwitcher.qml @@ -430,6 +430,49 @@ FocusScope { } } + RowLayout { + id: scrubIndicator + opacity: taskSwitcherHelpers.isInTaskScrubMode ? 1 : 0 + Behavior on opacity { NumberAnimation { duration: 200} } + + anchors.bottom: parent.bottom + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottomMargin: taskSwitcherHelpers.openedYPosition * 3 / 4 + + Kirigami.Icon { + id: iconScrubBack + opacity: root.state.currentTaskIndex == 0 ? 0.3 : 1 + Behavior on opacity { NumberAnimation { duration: 200} } + Layout.alignment: Qt.AlignHCenter + implicitWidth: Kirigami.Units.iconSizes.small + implicitHeight: Kirigami.Units.iconSizes.small + source: "draw-arrow-back" + color: "white" + } + + Kirigami.Heading { + Layout.fillWidth: true + Layout.maximumWidth: root.width * 0.75 + Layout.alignment: Qt.AlignHCenter + color: "white" + level: 3 + wrapMode: Text.Wrap + horizontalAlignment: Text.AlignHCenter + text: i18n("Swipe") + } + + Kirigami.Icon { + id: iconScrubFront + opacity: root.state.currentTaskIndex == tasksCount - 1 ? 0.3 : 1 + Behavior on opacity { NumberAnimation { duration: 200} } + Layout.alignment: Qt.AlignHCenter + implicitWidth: Kirigami.Units.iconSizes.small + implicitHeight: Kirigami.Units.iconSizes.small + source: "draw-arrow-forward" + color: "white" + } + } + // flicking area for task switcher FlickContainer { id: flickable diff --git a/kwin/mobiletaskswitcher/qml/TaskSwitcherHelpers.qml b/kwin/mobiletaskswitcher/qml/TaskSwitcherHelpers.qml index ffb99d6b..1b06242b 100644 --- a/kwin/mobiletaskswitcher/qml/TaskSwitcherHelpers.qml +++ b/kwin/mobiletaskswitcher/qml/TaskSwitcherHelpers.qml @@ -31,7 +31,7 @@ QtObject { readonly property real openedYPosition: (taskSwitcher.height - taskHeight) / 2 // yPosition threshold below which opening the task switcher should be undone and returned to the previously active task - readonly property real undoYThreshold: openedYPosition / 3 + readonly property real undoYThreshold: openedYPosition / 2 // ~~ measurement constants ~~