Skip to content
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

UI scales on window resize #653

Closed
woelper opened this issue Aug 26, 2021 · 7 comments
Closed

UI scales on window resize #653

woelper opened this issue Aug 26, 2021 · 7 comments
Labels
native-glium Relates to running egui_glium on native

Comments

@woelper
Copy link

woelper commented Aug 26, 2021

Since 04b3921 resizing a window scales it's contents until the resize operation is complete, causing the contents to look very stretched.
This happens on OSX, I will try to reproduce/test this on other operating systems, too.

@emilk
Copy link
Owner

emilk commented Aug 26, 2021

@emilk emilk added the native-glium Relates to running egui_glium on native label Aug 26, 2021
@woelper
Copy link
Author

woelper commented Aug 28, 2021

Thank you for getting back so quickly on this (and for this awesome library by the way). I guess there is sound reasoning behind using run_return - do you think it's realistic that this is going to change again in the future, or is this at the mercy of winit?

The reason I ask is that I am currently building tools that might get resized a lot and I am thinking of pinning them to an older commit to be more user friendly, which of course in no good idea in the long run :)

@emilk
Copy link
Owner

emilk commented Aug 28, 2021

@woelper you can try helping @PolyMeilex fix this in winit: #270 (comment)

If we manage to fix winit:s run vs dialog issue, then we can revert #631, but until then I prioritize supporting file dialogs over nice resize behavior.

We could of course add some feature-flag to egui_glium/eframe for switching which event pump to use, but I'd rather avoid that if possible.

@PolyMeilex
Copy link

PolyMeilex commented Aug 28, 2021

Just for reference, here is my winit fork that fixes this: PolyMeilex/winit@e4a0a15

Here is also a little cleaner approach proposed in an issue:
rust-windowing/winit#1779 (comment)
(Currently not implemented by anyone)

@woelper
Copy link
Author

woelper commented Aug 28, 2021

@emilk Thank you for the explanation. After reading #631, this makes more sense, I was never expecting an immediate mode UI to work with a file dialog out of the box, so I was using nfd and later rfd with a channel, which worked very well with imgui-rs and egui. It seems like I can even stop doing that now!

@PolyMeilex Let me know if I can help you somehow! I lack plenty of experience with winit, but I have at least some hardware to test on should that help.

@emilk
Copy link
Owner

emilk commented Apr 16, 2022

We no longer use run_return, so this issue is no more

@emilk emilk closed this as completed Apr 16, 2022
@woelper
Copy link
Author

woelper commented Apr 19, 2022

Thank you so much @emilk !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
native-glium Relates to running egui_glium on native
Projects
None yet
Development

No branches or pull requests

3 participants