Fix: The background of CentralPanel will now cover unused space too
This commit is contained in:
parent
ea10add1cb
commit
ce0ea74c9f
2 changed files with 9 additions and 1 deletions
|
@ -29,6 +29,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
* `Slider` and `DragValue` uses fewer decimals by default. See the full precision by hovering over the value.
|
||||
* `egui::App`: added `fn name(&self)` and `fn clear_color(&self)`.
|
||||
|
||||
### Fixed 🐛
|
||||
|
||||
* The background for `CentralPanel` will now cover unused space too.
|
||||
|
||||
### Deprecated
|
||||
* `RawInput::screen_size` - use `RawInput::screen_rect` instead.
|
||||
* left/centered/right column functions on `Ui`.
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue