fix: window size saving
This commit is contained in:
parent
ebd09ab1c8
commit
f6fbf7226e
1 changed files with 2 additions and 3 deletions
|
@ -88,10 +88,9 @@ impl<Platform: PlatformCallbacks> App<Platform> {
|
||||||
ctx.send_viewport_cmd(ViewportCommand::CancelClose);
|
ctx.send_viewport_cmd(ViewportCommand::CancelClose);
|
||||||
Content::show_exit_modal();
|
Content::show_exit_modal();
|
||||||
} else {
|
} else {
|
||||||
|
let (w, h) = View::window_size(ctx);
|
||||||
|
AppConfig::save_window_size(w, h);
|
||||||
ctx.input(|i| {
|
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 {
|
if let Some(rect) = i.viewport().outer_rect {
|
||||||
AppConfig::save_window_pos(rect.left(), rect.top());
|
AppConfig::save_window_pos(rect.left(), rect.top());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue