diff --git a/src/gui/screens/accounts.rs b/src/gui/screens/accounts.rs index 1e7a46e..d29ab96 100644 --- a/src/gui/screens/accounts.rs +++ b/src/gui/screens/accounts.rs @@ -51,7 +51,7 @@ impl Screen for Accounts { Navigator::to(ScreenId::Account) }; if ui.button(format!("{}BACK ", ARROW_CIRCLE_LEFT)).clicked() { - Navigator::to(ScreenId::Account) + Navigator::back() }; }); } diff --git a/src/gui/views/modal.rs b/src/gui/views/modal.rs index eff7abc..1b6ab69 100644 --- a/src/gui/views/modal.rs +++ b/src/gui/views/modal.rs @@ -107,18 +107,18 @@ impl Modal { /// Show Modal with provided content. pub fn ui(&self, ui: &mut egui::Ui, add_content: impl FnOnce(&mut egui::Ui, &Modal)) { - // Show background Window at full available size. + let mut rect = ui.ctx().screen_rect(); egui::Window::new("modal_bg_window") .title_bar(false) .resizable(false) .collapsible(false) - .fixed_size(ui.ctx().used_size()) + .fixed_rect(rect) .frame(egui::Frame { fill: Colors::SEMI_TRANSPARENT, ..Default::default() }) .show(ui.ctx(), |ui| { - ui.set_min_size(ui.available_size()); + ui.set_min_size(rect.size()); }); // Choose width of modal content.