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

Separate clip_rect and desired_rect in Region

This commit is contained in:
Emil Ernerfeldt
2020-04-21 07:42:33 +02:00
parent 94fdc2fd55
commit 864eae2081
3 changed files with 68 additions and 54 deletions

View File

@@ -362,7 +362,7 @@ impl<'a> Widget for Slider<'a> {
let response = naked.add_to(&mut columns[0]);
// columns[1].available_space.y = response.rect.size().y;
columns[1].rect.set_height(response.rect.size().y); // TODO: explain this line
columns[1].desired_rect.set_height(response.rect.size().y); // TODO: explain this line
columns[1].horizontal(Align::Center, |region| {
region.add(Label::new(full_text));
});