summaryrefslogtreecommitdiffstats
path: root/graphics/src/widget/text_input.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-05-27 23:09:27 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-05-27 23:09:27 +0200
commit823ea1573245b849a0696543838a7ad1d0f914d8 (patch)
tree209b1697e46399210daa573d0479986b01d6053d /graphics/src/widget/text_input.rs
parent22ced3485eb6f295faaab1e31d8d1b8d61fc422b (diff)
downloadiced-823ea1573245b849a0696543838a7ad1d0f914d8.tar.gz
iced-823ea1573245b849a0696543838a7ad1d0f914d8.tar.bz2
iced-823ea1573245b849a0696543838a7ad1d0f914d8.zip
Update `glyph_brush` and `glow_glyph`
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
}