EditableText scroll with inset#24268
Open
ickshonpe wants to merge 13 commits into
Open
Conversation
`scroll_editable_text` scrolling calculations changed to support the inset.
…oint` when dragging. So each time the mouse moves during a drag, the current selection is cleared and a new selection is created. As long as the local drag start position is constant this is seamless, but if you scroll the text input view, the start of the drag is now at a different position relative to the text layout, and the start of the selection range changes. Solution: Don't queue the `MoveToPoint` edit.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Objective
Solution
EditableTextNeedsScroll, newtypesbool. If set totruethe editor view scrolls next update.bevy_ui::widget::text_input_layout::scroll_axis_with_inset.scroll_insetfield onEditableTextcontrols the size of the view inset (is normalized).Testing
Scrolling by dragging is too fast, and needs to be limited. Leaving it to a follow up, as this PR has a largish number of changes already.