summaryrefslogtreecommitdiffstats
path: root/native/src/widget/text_input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/widget/text_input.rs')
-rw-r--r--native/src/widget/text_input.rs14
1 files changed, 4 insertions, 10 deletions
diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs
index 42aa3d69..c068b895 100644
--- a/native/src/widget/text_input.rs
+++ b/native/src/widget/text_input.rs
@@ -183,16 +183,10 @@ where
.max_width(self.max_width)
.height(Length::Units(text_size));
- let mut text =
- layout::Node::new(limits.resolve(Size::ZERO), Size::ZERO);
- text.bounds.x = padding;
- text.bounds.y = padding;
-
- layout::Node::with_children(
- text.size().pad(padding),
- Size::ZERO,
- vec![text],
- )
+ let mut text = layout::Node::new(limits.resolve(Size::ZERO));
+ text.move_to(Point::new(padding, padding));
+
+ layout::Node::with_children(text.size().pad(padding), vec![text])
}
fn on_event(