We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
measure_value
iced_wgpu
1 parent d51b501 commit 9afa318Copy full SHA for 9afa318
1 file changed
wgpu/src/renderer/widget/text_input.rs
@@ -23,11 +23,11 @@ impl text_input::Renderer for Renderer {
23
Size::INFINITY,
24
);
25
26
- let spaces_at_the_end = value.len() - value.trim_end().len();
+ let spaces_around = value.len() - value.trim().len();
27
28
- if spaces_at_the_end > 0 {
+ if spaces_around > 0 {
29
let space_width = self.text_pipeline.space_width(size as f32);
30
- width += spaces_at_the_end as f32 * space_width;
+ width += spaces_around as f32 * space_width;
31
}
32
33
width
0 commit comments