summaryrefslogtreecommitdiffstats
path: root/graphics/src/widget/text_input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/src/widget/text_input.rs')
-rw-r--r--graphics/src/widget/text_input.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/graphics/src/widget/text_input.rs b/graphics/src/widget/text_input.rs
index 023bdd7f..893197d1 100644
--- a/graphics/src/widget/text_input.rs
+++ b/graphics/src/widget/text_input.rs
@@ -37,16 +37,9 @@ where
fn measure_value(&self, value: &str, size: u16, font: Font) -> f32 {
let backend = self.backend();
- let (mut width, _) =
+ let (width, _) =
backend.measure(value, f32::from(size), font, Size::INFINITY);
- let spaces_around = value.len() - value.trim().len();
-
- if spaces_around > 0 {
- let space_width = backend.space_width(size as f32);
- width += spaces_around as f32 * space_width;
- }
-
width
}