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