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

Add ui.allocate_at_least and ui.allocate_exact_size

This commit is contained in:
Emil Ernerfeldt
2021-01-06 11:03:29 +01:00
parent f68c30e0c7
commit b4871e2aef
15 changed files with 74 additions and 72 deletions

View File

@@ -66,8 +66,7 @@ impl FrameHistory {
// TODO: we should not use `slider_width` as default graph width.
let height = ui.style().spacing.slider_width;
let size = vec2(ui.available_size_before_wrap_finite().x, height);
let response = ui.allocate_response(size, Sense::hover());
let rect = response.rect;
let (rect, response) = ui.allocate_at_least(size, Sense::hover());
let style = ui.style().noninteractive();
let mut cmds = vec![PaintCmd::Rect {