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

Remember to update glow window size when DPI changes (#1441)

This commit is contained in:
Emil Ernerfeldt
2022-04-03 10:20:49 +02:00
committed by GitHub
parent aa6a2bb73f
commit 95efbbc03e
4 changed files with 18 additions and 4 deletions

View File

@@ -136,8 +136,14 @@ pub fn run(app_name: &str, native_options: &epi::NativeOptions, app_creator: epi
is_focused = new_focused;
}
if let winit::event::WindowEvent::Resized(physical_size) = event {
gl_window.resize(physical_size);
if let winit::event::WindowEvent::Resized(physical_size) = &event {
gl_window.resize(*physical_size);
} else if let glutin::event::WindowEvent::ScaleFactorChanged {
new_inner_size,
..
} = &event
{
gl_window.resize(**new_inner_size);
}
integration.on_event(app.as_mut(), &event);