Fix combo box width

This commit is contained in:
Emil Ernerfeldt 2020-12-08 21:32:12 +01:00
parent 5cd07db96a
commit 98bb0f4110
3 changed files with 6 additions and 4 deletions

View file

@ -4,9 +4,8 @@ TODO-list for the Egui project. If you looking for something to do, look here.
## Layout refactor
* Deprecate `add_custom_contents`
* Fix and test `allocate_ui`
*
* Test `allocate_ui`
* Justified alignment of radio button and checkboxes
## Misc

View file

@ -465,7 +465,6 @@ impl Layout {
Direction::TopDown => pos2(rect.left(), rect.bottom() + item_spacing.y),
Direction::BottomUp => pos2(rect.left(), rect.top() - item_spacing.y),
};
region.expand_to_include_rect(rect);
}
}

View file

@ -454,6 +454,7 @@ impl Ui {
self.layout
.advance_after_outer_rect(&mut self.region, outer_child_rect, item_spacing);
self.region.expand_to_include_rect(inner_child_rect);
self.next_auto_id = self.next_auto_id.wrapping_add(1);
inner_child_rect
@ -483,6 +484,7 @@ impl Ui {
outer_child_rect.union(final_child_rect),
item_spacing,
);
self.region.expand_to_include_rect(final_child_rect);
let response = self.interact_hover(final_child_rect);
(ret, response)
@ -512,6 +514,7 @@ impl Ui {
outer_child_rect.union(final_child_rect),
item_spacing,
);
self.region.expand_to_include_rect(final_child_rect);
let response = self.interact_hover(final_child_rect);
(ret, response)
@ -852,6 +855,7 @@ impl Ui {
let item_spacing = self.style().spacing.item_spacing;
self.layout
.advance_after_outer_rect(&mut self.region, rect, item_spacing);
self.region.expand_to_include_rect(rect);
(ret, self.interact_hover(rect))
}