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

Fix text clipping #2154

Merged
merged 4 commits into from
Dec 2, 2023
Merged

Fix text clipping #2154

merged 4 commits into from
Dec 2, 2023

Conversation

hecrj
Copy link
Member

@hecrj hecrj commented Dec 1, 2023

This PR fixes a couple issues related to text rendering and layouting:

  • Text layout sizing not being clamped to maximum available space.
  • Text being clipped to layout boundaries. Now the viewport bounds are used instead.

Since widgets can now control the clipping viewport when drawing text, the text_input widget does not need to issue a new rendering layer when horizontal scrolling is needed.

Additionally, the container, column, and row widgets will only draw its contents when they are actually visible.

@hecrj hecrj added bug Something isn't working text rendering labels Dec 1, 2023
@hecrj hecrj added this to the 0.12 milestone Dec 1, 2023
graphics/src/primitive.rs Outdated Show resolved Hide resolved
@hecrj hecrj enabled auto-merge December 2, 2023 14:56
@hecrj hecrj merged commit 8727b3f into master Dec 2, 2023
26 checks passed
@hecrj hecrj deleted the fix/text-clipping branch December 2, 2023 15:10
@hecrj hecrj added the fix label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix rendering text
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants