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

Fix: The background of CentralPanel will now cover unused space too

This commit is contained in:
Emil Ernerfeldt
2020-12-19 11:17:21 +01:00
parent ea10add1cb
commit ce0ea74c9f
2 changed files with 9 additions and 1 deletions

View File

@@ -138,7 +138,11 @@ impl CentralPanel {
let mut panel_ui = Ui::new(ctx.clone(), layer_id, id, panel_rect, clip_rect);
let frame = Frame::background(&ctx.style());
let r = frame.show(&mut panel_ui, |ui| add_contents(ui));
let r = frame.show(&mut panel_ui, |ui| {
let r = add_contents(ui);
ui.expand_to_include_rect(ui.max_rect()); // Use it all
r
});
let panel_rect = panel_ui.min_rect();
let response = panel_ui.interact_hover(panel_rect);