mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
Add clock in top right corner using reverse layout in menu bar
This commit is contained in:
@@ -31,7 +31,9 @@ pub fn bar(ui: &mut Ui, add_contents: impl FnOnce(&mut Ui)) -> InteractInfo {
|
||||
ui.set_style(style);
|
||||
|
||||
// Take full width and fixed height:
|
||||
ui.expand_to_size(vec2(ui.available().width(), ui.style().menu_bar.height));
|
||||
let height = ui.style().menu_bar.height;
|
||||
ui.set_desired_height(height);
|
||||
ui.expand_to_size(vec2(ui.available().width(), height));
|
||||
add_contents(ui)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user