Skip to content

Commit

Permalink
Set Response::intrinsic_size for TextEdit (#5266)
Browse files Browse the repository at this point in the history
This allows me to correctly support multiline TextEdits in egui_flex
  • Loading branch information
lucasmerlin authored Oct 15, 2024
1 parent 23728e1 commit 707cd03
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/egui/src/widgets/text_edit/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ impl<'t> TextEdit<'t> {
Sense::hover()
};
let mut response = ui.interact(outer_rect, id, sense);
response.intrinsic_size = Some(desired_outer_size);

response.fake_primary_click = false; // Don't sent `OutputEvent::Clicked` when a user presses the space bar

Expand Down

0 comments on commit 707cd03

Please sign in to comment.