Fix `TextEdit` being too short whenever there is horizontal margin (#4005)
The allocated width is reduced by the horizontal margin inside `show_content` but the margin is already factored into the content_ui's rect. This causes both text and frame (not shown here) to be `2.0 * margin.x` too short. Before:  After:  (*The blue rect is the TextEdit's (expected) final size.) Co-authored-by: Georg Weisert <georg.weisert@freshx.de>
This commit is contained in:
parent
310d85a7fa
commit
808dc0103a
|
|
@ -470,7 +470,7 @@ impl<'t> TextEdit<'t> {
|
|||
available_width
|
||||
} else {
|
||||
desired_width.min(available_width)
|
||||
} - margin.x * 2.0;
|
||||
};
|
||||
|
||||
let font_id_clone = font_id.clone();
|
||||
let mut default_layouter = move |ui: &Ui, text: &str, wrap_width: f32| {
|
||||
|
|
|
|||
Loading…
Reference in New Issue