Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved text selection #4127

Merged
merged 4 commits into from Nov 13, 2022
Merged

Conversation

kornes
Copy link
Contributor

@kornes kornes commented Nov 8, 2022

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

Currently while selecting text, each character is counted as selected in odd way:

  • when selecting to the left, first pixel will match whole character as selected
  • when selecting to the right, last pixel of the character will make it selected

this PR changes this behavior to match how Windows (and probably other OSes too) deal with it: characters are selected as soon as 50% of its width is hovered by mouse. This change will also make text selection behave same way in both directions.

Before

before.mp4

After

after.mp4

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2022

clang-tidy review says "All clean, LGTM! 👍"

@pajlada pajlada enabled auto-merge (squash) November 13, 2022 11:13
@pajlada pajlada merged commit d409e3f into Chatterino:master Nov 13, 2022
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@kornes kornes deleted the ref_better-selection branch November 13, 2022 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants