summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-02-07 21:48:28 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-02-07 21:48:28 +0100
commit2ba73b0faf04c21053f279e7c189b28ca718d853 (patch)
tree482aa7ceac3e22533cb0a1732c951337765e68a8 /graphics
parent8b492a9b443993f1db2d3df31a29bc68738d73c9 (diff)
downloadiced-2ba73b0faf04c21053f279e7c189b28ca718d853.tar.gz
iced-2ba73b0faf04c21053f279e7c189b28ca718d853.tar.bz2
iced-2ba73b0faf04c21053f279e7c189b28ca718d853.zip
Fix wrapped lines not being considered when measuring `TextEditor`
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/text/editor.rs6
1 files changed, 6 insertions, 0 deletions
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,