1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

[egui_glium] Restore window position when starting app

This commit is contained in:
Emil Ernerfeldt
2020-12-21 22:10:31 +01:00
parent 05f3cd66ce
commit dbab277658
2 changed files with 11 additions and 5 deletions

View File

@@ -60,7 +60,13 @@ fn create_display(
.with_stencil_buffer(0)
.with_vsync(true);
glium::Display::new(window_builder, context_builder, &event_loop).unwrap()
let display = glium::Display::new(window_builder, context_builder, &event_loop).unwrap();
if let Some(window_settings) = &window_settings {
window_settings.restore_positions(&display);
}
display
}
fn create_storage(app_name: &str) -> Option<Box<dyn egui::app::Storage>> {