example-framework: resize surface on scale factor change

This commit is contained in:
Christofer Nolander
2021-08-27 19:56:04 +02:00
committed by Dzmitry Malyshau
parent c3de161dd2
commit 39e8921fe8

View File

@@ -233,7 +233,12 @@ fn start<E: Example>(
window.request_redraw();
}
event::Event::WindowEvent {
event: WindowEvent::Resized(size),
event:
WindowEvent::Resized(size)
| WindowEvent::ScaleFactorChanged {
new_inner_size: &mut size,
..
},
..
} => {
log::info!("Resizing to {:?}", size);