1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 21:00:03 -04:00

misc code cleanup

This commit is contained in:
Emil Ernerfeldt
2022-07-29 16:07:26 +02:00
parent b0fa0c65cc
commit 4e8a6e3370
6 changed files with 28 additions and 12 deletions

View File

@@ -106,6 +106,7 @@ impl Placer {
/// This is what you then pass to `advance_after_rects`.
/// Use `justify_and_align` to get the inner `widget_rect`.
pub(crate) fn next_space(&self, child_size: Vec2, item_spacing: Vec2) -> Rect {
egui_assert!(child_size.is_finite() && child_size.x >= 0.0 && child_size.y >= 0.0);
self.region.sanity_check();
if let Some(grid) = &self.grid {
grid.next_cell(self.region.cursor, child_size)