1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-03 23:30:04 -04:00

Shrink the byte-size of Response slightly (#8011)

Small optimization! 96 -> 88 bytes, so no huge win.
This commit is contained in:
Emil Ernerfeldt
2026-03-24 15:46:56 +01:00
committed by GitHub
parent 5ed92c3011
commit a1af9abe70
7 changed files with 57 additions and 23 deletions

View File

@@ -318,8 +318,9 @@ impl<'a> AtomLayout<'a> {
let (_, rect) = ui.allocate_space(frame_size);
let mut response = ui.interact(rect, id, sense);
response.intrinsic_size =
Some((Vec2::new(intrinsic_width, intrinsic_height) + margin.sum()).at_least(min_size));
response.set_intrinsic_size(
(Vec2::new(intrinsic_width, intrinsic_height) + margin.sum()).at_least(min_size),
);
AllocatedAtomLayout {
sized_atoms: sized_items,