-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HiDpiMode::Default does not use the DPI factor from winit #288
Comments
It definitely sounds like a DPI factor bug, although I don't yet see what the problem could be in Which operating system and winit version are you using? Windows + winit 0.19? |
Windows 10 1909, winit v0.19.3 (*). imgui-rs git master ccec55c. When opening the "test_window_impl" example with Windows set to 125% scale, fonts are the same size at 100% scale. When opening at 150% or 175% scale, fonts are exactly twice the size as at 100% scale, and chunky (nearest neighbor upscaling). When I first open the example, then switch Windows from 125% to 175%, the example window becomes blurry, but cursor clicks are not misaligned. |
@Gekkio I am on linux with awesomewm. I think the problem was that the the dpi factor is cached but I'll post some results when I get home and have a look at it again. |
Closing old issue - this was around imgui-rs 0.3. With ~v0.8 the DPI scaling seems to work correctly on Linux at least under XFCE4 and Sway |
The docs state
But if you look at this "helper" function, the winit dpi is not used at all in with
Default
.On my machine the dpi for my window changes from 1.0 to 1.16 after a while, and now the mouse clicks are all off center. I realized that when I use
HiDpiMode::Rounded
, everything works fine.I think the problem is that the framebuffer scale is set correctly for dpi changes, but
scale_pos_from_winit
doesn't get the correct size. I think it also should scale it by the current dpi.The text was updated successfully, but these errors were encountered: