1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-03 15:20:05 -04:00

Add Ui::spacing() and Ui::spacing_mut() as shortcuts

This commit is contained in:
Emil Ernerfeldt
2021-02-01 16:55:40 +01:00
parent c687671a9f
commit 01fca2f31c
24 changed files with 96 additions and 85 deletions

View File

@@ -64,7 +64,7 @@ impl FrameHistory {
let history = &self.frame_times;
// TODO: we should not use `slider_width` as default graph width.
let height = ui.style().spacing.slider_width;
let height = ui.spacing().slider_width;
let size = vec2(ui.available_size_before_wrap_finite().x, height);
let (rect, response) = ui.allocate_at_least(size, Sense::hover());
let style = ui.style().noninteractive();