New widget SelectableLabel; use ScrollComponent in ScrollLabel, EditBox #520
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.
Rework how
ScrollLabel
,ScrollText
,EditBox
handle scrolling: these now all use aScrollComponent
in the outer widget and do not support scrolling in the inner widget.SelectableLabel
was added as the new inner widget ofScrollLabel
.ScrollLabel
andScrollText
were merged into a single widget. This also fixes the inaccurate usage ofRole
in #519.TextInput
component no longer handles kinetic scrolling and better tracks the current action "phase".Fixes:
fn Tile::translation
now takes argumentindex
, allowing per-child translation. This is required for the newScrollLabel
,EditBox
but also allowstranslation
to more accurately match AccessKit.fn EditField::set_outer_rect
EditField
. (We still don't replace explicit new-lines in the text when rendering though, like most single-line edit widgets do.)EditField
: use the text height when available but also use Em size as a backup for empty fields or requesting excess size. The real fix is... well, there isn't really one considering we don't know what fonts might be used as a fallback and what glyph heights they might use.child_rect
allocation inScrollRegion
. (Not properly tested but I'm pretty sure the old code was wrong.)