mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 07:03:08 +00:00
add basic UI indication of task scrub mode being active
includes a UI hint of what to do
This commit is contained in:
parent
29656981bb
commit
39a3625329
2 changed files with 44 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 ~~
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue