mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -04:00
Make Region::child_bounds private
This commit is contained in:
@@ -120,9 +120,11 @@ impl CollapsingHeader {
|
||||
|
||||
let top_left = child_region.top_left();
|
||||
add_contents(child_region);
|
||||
// Pretend children took up less space than they did:
|
||||
child_region.child_bounds.max.y =
|
||||
child_region.child_bounds.max.y.min(top_left.y + max_height);
|
||||
|
||||
// Pretend children took up less space:
|
||||
let mut child_bounds = child_region.child_bounds();
|
||||
child_bounds.max.y = child_bounds.max.y.min(top_left.y + max_height);
|
||||
child_region.force_set_child_bounds(child_bounds);
|
||||
});
|
||||
} else if state.open {
|
||||
region.indent(id, add_contents);
|
||||
|
||||
@@ -35,9 +35,7 @@ impl Frame {
|
||||
},
|
||||
);
|
||||
|
||||
// TODO: move up corsor?
|
||||
region
|
||||
.child_bounds
|
||||
.extend_with(child_region.child_bounds.max + margin);
|
||||
region.expand_to_include_child(child_region.rect().expand2(margin));
|
||||
// TODO: move up cursor?
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user