From 2ba73b0faf04c21053f279e7c189b28ca718d853 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 7 Feb 2024 21:48:28 +0100 Subject: Fix wrapped lines not being considered when measuring `TextEditor` --- graphics/src/text/editor.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'graphics/src/text/editor.rs') diff --git a/graphics/src/text/editor.rs b/graphics/src/text/editor.rs index d5262ae8..c488a51c 100644 --- a/graphics/src/text/editor.rs +++ b/graphics/src/text/editor.rs @@ -470,6 +470,12 @@ impl editor::Editor for Editor { self.internal().bounds } + fn min_bounds(&self) -> Size { + let internal = self.internal(); + + text::measure(internal.editor.buffer()) + } + fn update( &mut self, new_bounds: Size, -- cgit