From f6fbf7226eaaf3e3f964bb82fe6dc057a26d0671 Mon Sep 17 00:00:00 2001 From: ardocrat Date: Sat, 26 Oct 2024 23:54:47 +0300 Subject: [PATCH] fix: window size saving --- src/gui/app.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/app.rs b/src/gui/app.rs index 6cef329d..026e8480 100644 --- a/src/gui/app.rs +++ b/src/gui/app.rs @@ -88,10 +88,9 @@ impl App { ctx.send_viewport_cmd(ViewportCommand::CancelClose); Content::show_exit_modal(); } else { + let (w, h) = View::window_size(ctx); + AppConfig::save_window_size(w, h); ctx.input(|i| { - if let Some(rect) = i.viewport().inner_rect { - AppConfig::save_window_size(rect.width(), rect.height()); - } if let Some(rect) = i.viewport().outer_rect { AppConfig::save_window_pos(rect.left(), rect.top()); }