-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
EditableText improved scrolling
#24268
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
Closed
ickshonpe
wants to merge
24
commits into
bevyengine:main
from
ickshonpe:text-input-scroll-with-inset
+364
−33
Closed
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
119362a
Added `scroll_inset` field to `EditableText`.
ickshonpe 454334e
`on_pointer_drag` queues `MoveToPoint` as well as `ExtendSelectionToP…
ickshonpe 2154aad
Removed unused import.
ickshonpe fa303e7
Merge branch 'editabletext-drag-selection-fix' into text-input-scroll…
ickshonpe a633abd
Added `NeedsScroll` component tracking if scrolling needs to be recal…
ickshonpe 3b9f893
Don't scroll on `ExtendSelectionToPoint`
ickshonpe 3281913
Set needs scroll if pointer dragged outside of editor.
ickshonpe f4bdad7
Fixed content box drag check
ickshonpe bf0ada7
MoveToPoint needs scroll
ickshonpe 0ae93a7
clean up
ickshonpe a01c105
Fixed texts by denormalizing inset values.
ickshonpe c7e5858
cargo fmt --all
ickshonpe 104d930
renamed variables for clarity
ickshonpe 2a8bfe9
Merge branch 'main' into text-input-scroll-with-inset
ickshonpe 54a3a34
added bevy_time dep
ickshonpe 3500d2d
Added drag_scroll_text_inputs system
ickshonpe f43b28e
scale line by scale factor
ickshonpe b25f034
set horizontal scroll 0 when inside horizontal bounds
ickshonpe 2abcc63
Set needs scroll on deferred paste edits
ickshonpe b550778
update scroll if ComputedNode is changed
ickshonpe 6f78e91
Sometimes gaps occur between vertically adjacent text selection rects…
ickshonpe 03f3664
Merge branch 'main' into text-input-scroll-with-inset
ickshonpe 23757dd
Merge branch 'selection-rects-gap-fix' into text-input-scroll-with-inset
ickshonpe 21cc903
floor drag scroll offset
ickshonpe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of
0.49here and on line 568 seems a little magical. Why not 0.5 exactly? Would line 627 then catch the original intended case via e.g.let new_v_min = if v_size - 2. * inset <= t_size {?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.5 is probably fine, clamping it below 0.49 felt safer though. It's just a defensive measure to preemptively head off the inevitable rounding bugs that pop up everywhere.