Browse Source

[demo] bug fix: add back clock in upper right corner

pull/20/head
Emil Ernerfeldt 4 years ago
parent
commit
d07132cc13
  1. 15
      egui/src/demos/app.rs

15
egui/src/demos/app.rs

@ -277,14 +277,13 @@ fn show_menu_bar(ui: &mut Ui, windows: &mut OpenWindows) {
(time.rem_euclid(60.0)).floor(),
(time.rem_euclid(1.0) * 100.0).floor()
);
ui.inner_layout(Layout::horizontal(Align::Max).reverse(), |ui| {
if ui
.add(Button::new(time).text_style(TextStyle::Monospace))
.clicked
{
windows.fractal_clock = !windows.fractal_clock;
}
});
ui.set_layout(Layout::horizontal(Align::Max).reverse());
if ui
.add(Button::new(time).text_style(TextStyle::Monospace))
.clicked
{
windows.fractal_clock = !windows.fractal_clock;
}
}
});
}

Loading…
Cancel
Save