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

Simplify and unify queries about available space

This commit is contained in:
Emil Ernerfeldt
2020-05-12 18:21:09 +02:00
parent 6f7bc3cfac
commit 7a1c97ccfe
15 changed files with 91 additions and 108 deletions

View File

@@ -31,7 +31,7 @@ pub fn bar(ui: &mut Ui, add_contents: impl FnOnce(&mut Ui)) {
ui.set_style(style);
// Take full width and fixed height:
ui.expand_to_size(vec2(ui.available_width(), ui.style().menu_bar.height));
ui.expand_to_size(vec2(ui.available().width(), ui.style().menu_bar.height));
add_contents(ui)
})
})