Skip to content
Commit 5c4dbf15 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Vertical scroll in timeline with Shift + Wheel

parent 81dc0acc
  • Contributor

    This is opposite the conventional behaviour of pretty much every operating system, desktop environment, UI framework, application and platform. I would recommend inverting the vertical and horizontal scrolling that this commit implements. i.e. unmodified scrolling for vertical, Shift + scrolling for horizontal. Users would be far less likely to get a jarring UX that way.

    At the least, this should be an application setting/preference to let the user decide the way they want Shift + scroll to behave.

    Edited by Pistos Pi
  • Contributor

    Suggested patch:

    diff --git a/src/timeline2/view/qml/timeline.qml b/src/timeline2/view/qml/timeline.qml
    index 948b52ca6..8fb331e63 100644
    --- a/src/timeline2/view/qml/timeline.qml
    +++ b/src/timeline2/view/qml/timeline.qml
    @@ -81,13 +81,13 @@ Rectangle {
                     root.zoomOut(true);
                 }
             } else if (wheel.modifiers & Qt.ShiftModifier) {
    -            // Vertical scroll
    -            var newScroll = Math.min(scrollView.flickableItem.contentY - wheel.angleDelta.y, trackHeaders.height - tracksArea.height + scrollView.__horizontalScrollBar.height + cornerstone.height)
    -            scrollView.flickableItem.contentY = Math.max(newScroll, 0)
    -        } else {
                 // Horizontal scroll
                 var newScroll = Math.min(scrollView.flickableItem.contentX - wheel.angleDelta.y, timeline.fullDuration * root.timeScale - (scrollView.width - scrollView.__verticalScrollBar.width))
                 scrollView.flickableItem.contentX = Math.max(newScroll, 0)
    +        } else {
    +            // Vertical scroll
    +            var newScroll = Math.min(scrollView.flickableItem.contentY - wheel.angleDelta.y, trackHeaders.height - tracksArea.height + scrollView.__horizontalScrollBar.height + cornerstone.height)
    +            scrollView.flickableItem.contentY = Math.max(newScroll, 0)
             }
             wheel.accepted = true
         }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment