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.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs
index 0a2b19a3..c2950db9 100644
--- a/native/src/widget/text_input.rs
+++ b/native/src/widget/text_input.rs
@@ -751,11 +751,9 @@ where
};
if text_width > text_bounds.width {
- renderer.with_layer(
- text_bounds,
- Vector::new(offset as u32, 0),
- render,
- );
+ renderer.with_layer(text_bounds, |renderer| {
+ renderer.with_translation(Vector::new(-offset, 0.0), render)
+ });
} else {
render(renderer);
}