mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-11 21:48:36 +00:00
attach_window() was using the imgui scale factor when converting winit physical size to logical size instead of the winit scale factor. This would cause the imgui display size to be incorrect when not using the HiDpiMode::Default mode (in default mode the imgui and winit scale factors are the same and the issue goes unnoticed). Note that handle_window_event() has similar (and correct) logic when handling WindowEvent::Resized events. This also explain why the issue went mostly undiscovered as winit tends to generate quite a bunch of resize events that would hide the miscalculation done in attach_window(). A similar issue was also fixed in the WindowEvent::ScaleFactorChanged handling code. should fix https://github.com/imgui-rs/imgui-rs/issues/441