Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • K KTextEditor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Frameworks
  • KTextEditor
  • Merge requests
  • !123

Add basic touchscreen support

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Daniel Tang requested to merge danielt/ktexteditor:touch into master Mar 18, 2021
  • Overview 12
  • Commits 2
  • Changes 2

Support scrolling with touchscreen gestures.

Before

The finger behaves like a mouse. Moving it only moves the cursor and selects text, unlike how one would expect. The only way to scroll is to touch the oversensitive scrollbar on the right or drag the finger out of the text area and wait.

After

I implemented basic QScroller kinetic vertical scrolling support. Horizontal scrolling, overscroll, scroll between lines, and word wrap awareness are out of the scope of this MR.

Additionally, moving the cursor with a single tap works. Double tapping to select a word doesn't work (it should really display selection handles). Triple clicking to select the line with the first two clicks done with a mouse works for some reason. For some reason, swiping horizontally starts text selection, and this continues when the drag is continued in any direction after that. Scrolling with the mouse wheel still works. A stylus still behaves like the mouse, and that's intended because that's what CLion does.

This MR considerably improves the user experience in a long file, such as when scrolling and completely reading the files changed

Edited Mar 18, 2021 by Daniel Tang
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: touch