Skip to content

Conversation

@ghzdude
Copy link
Contributor

@ghzdude ghzdude commented Sep 20, 2025

What

fixes scroll text drawing incorrectly when using center or bottom alignments
noticable when not calling alignment(), as the default alignment for richtext is center left

Implementation Details

extend text renderer to override getStartY()
also make lastX and lastY accessible

Outcome

scroll text widget draws properly regardless of the alignment used

@ghzdude ghzdude requested a review from a team as a code owner September 20, 2025 03:06
@ghzdude ghzdude added the type: bug Something isn't working label Sep 20, 2025
@Zorbatron
Copy link
Member

This makes it so the text is always aligned to the top. IMO for bottom or center alignments, it should start off in the center or bottom, and only "align" to the top once there are enough lines to fill the vertical space.

"improve" fix to drawing scrolling text
remove dirty field from ui builder
@ghzdude
Copy link
Contributor Author

ghzdude commented Oct 27, 2025

This makes it so the text is always aligned to the top. IMO for bottom or center alignments, it should start off in the center or bottom, and only "align" to the top once there are enough lines to fill the vertical space.

this has been implemented

it's also technically possible to set the scroll based on alignment, but it makes the code more complicated and idk if it'd be desirable.

@ghzdude ghzdude merged commit 70bfc8a into master Nov 17, 2025
3 checks passed
@ghzdude ghzdude deleted the gh/fix-scroll-text-drawing branch November 17, 2025 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants