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

DPI scaling #326

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

DPI scaling #326

wants to merge 2 commits into from

Conversation

BruegelN
Copy link

@BruegelN BruegelN commented Feb 1, 2025

This PR addresses #124

I've only tested this on my linux machine so far. So I'm happy to get some feedback for these changes.


Here some screenshots from before these changes.
On a 4k screen with 100% scaling:
before_with_4k_scalefactor_1
and with with 200% scaling:
before_with_4k_scalefactor_2
The only noticeable difference is the size of the top bar.


As of 40f4f27 on a 4k screen with 100% scaling:
40f4f27_with_4k_scalefactor_1
and with 200% scaling:
40f4f27_with_4k_scalefactor_2

@nmwsharp
Copy link
Owner

nmwsharp commented Feb 2, 2025

This is amazing, thanks so much, it's been on my TODO list for ages. We should definitely get it merged.

I'll want to test on some cross-platform machines to make sure we're getting that right (IIRC macOS in particular handles DPI differently). We should also think about trying to set this value reasonably by default based on the info we get from glfw. And add a UI slider! I briefly scrolled the code here now and it looks reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants