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_input::Renderer implementation in iced_wgpu #279

Merged
merged 2 commits into from Apr 9, 2020

Conversation

hecrj
Copy link
Member

@hecrj hecrj commented Apr 9, 2020

This PR fixes and improves the text_input::Renderer implementation in iced_wgpu. Specifically:

  • It fixes the measure_value implementation, which was incorrectly measuring text when spaces were present at the start.
  • It makes the draw implementation only produce a Clip primitive when the text value overflows the input. This should improve performance, as Clip primitives are currently very expensive.

It accounts for spaces at the start of text now.
@hecrj hecrj added the bug Something isn't working label Apr 9, 2020
@hecrj hecrj added this to the 0.1.1 milestone Apr 9, 2020
@hecrj hecrj self-assigned this Apr 9, 2020
It should only produce a `Clip` primitive when the contents overflow the
input now.
@hecrj hecrj force-pushed the fix/text-input-measure-value branch from 1a7f097 to d3dee84 Compare April 9, 2020 03:17
@hecrj hecrj merged commit 19f6a5e into master Apr 9, 2020
@hecrj hecrj deleted the fix/text-input-measure-value branch April 9, 2020 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant