Correct modal layout
This commit is contained in:
parent
3c340ef714
commit
c5e597bbea
|
@ -105,7 +105,7 @@ impl eframe::App for Ui {
|
|||
ctx.request_repaint();
|
||||
}
|
||||
|
||||
self.allowed_to_close = true;
|
||||
// self.allowed_to_close = true;
|
||||
egui::TopBottomPanel::bottom("status_bar").show(ctx, |ui| {
|
||||
ui.columns(2, |_columns| {});
|
||||
});
|
||||
|
@ -166,10 +166,8 @@ impl eframe::App for Ui {
|
|||
|
||||
if self.show_confirmation_dialog {
|
||||
// Show confirmation dialog:
|
||||
ui.separator();
|
||||
ui.vertical(|ui| {
|
||||
ui.with_layout(Layout::top_down_justified(Align::Center).with_main_align(Align::Center).with_cross_align(Align::Center), |ui| {
|
||||
ui.label("Really quit?");
|
||||
ui.horizontal(|ui| {
|
||||
if ui.button("Yes").clicked() {
|
||||
self.allowed_to_close = true;
|
||||
frame.close();
|
||||
|
@ -180,7 +178,6 @@ impl eframe::App for Ui {
|
|||
self.show_confirmation_dialog = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue