-
Notifications
You must be signed in to change notification settings - Fork 13
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
fixed scaling issues #9
base: main
Are you sure you want to change the base?
Conversation
… to conflicts being checked in newer version)
Hey, thanks for the PR! :) I want to merge this, but it doesn't seem to be a complete fix yet? According to emilk/egui#172, it should be possible to use |
i didn't see that. Having looked at it now there are two disctinct variables, one in egui and another in egui winit there is a conflict. Egui-Winit creates a desync between the screen rect in logical pixels in also according to documentation:
the correct way to implement this would be to fix egui-winit by making it use the system scale factor directly and having a user set multiplier. |
I now think the correct fix on top of your changes is to let egui tell us the scale factor: let scale_factor = egui_ctx.pixels_per_point() as f64; // egui_winit sets this to the window's native scale factor
let size = surface.window().inner_size().to_logical(scale_factor); By default this is the window's scale factor from winit, based on your display settings. self.current_pixels_per_point = egui_ctx.pixels_per_point(); // someone can have changed it to scale the UI The problem is that |
indeed it was that, my bad, i was wrong. |
also we may want to change the functions to do those calculations within the |
Not sure what you mean exactly. I do want to avoid a dependency on winit, that should be handled by egui_winit. By the way, I would prefer to merge this separately from the update to vulkano 0.30, to keep a clean git history. You could probably do an interactive rebase or use cherry picking to untangle the commits. I could also do it myself if you prefer (keeping you as commit author, of course). |
if you could do it it would be nice so you can have it your way, i don't care for authorship. |
Ok, I will take care of it, thanks! :) |
fixes #8