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

macOS: Scale GUI for Retina displays #625

Closed
rgov opened this issue Oct 29, 2023 · 4 comments · Fixed by #683
Closed

macOS: Scale GUI for Retina displays #625

rgov opened this issue Oct 29, 2023 · 4 comments · Fixed by #683

Comments

@rgov
Copy link

rgov commented Oct 29, 2023

The GUI is awkwardly scaled on macOS, where most Apple displays are going to be high DPI ("Retina"). Compare the menu text with the titlebar which is the normal system font size. The toolbar items look the right size.

image

There's some discussion here: ocornut/imgui#3757

@rgov
Copy link
Author

rgov commented Oct 29, 2023

GDK_SCALE=2 doesn't do it (#255 etc.)

@azonenberg
Copy link
Collaborator

ngscopeclient doesn't use GTK, so any of the pre-2022 issues about scaling won't be relevant.

Font scaling is calculated based on GetContentScale() from imgui (see MainWindow::UpdateFonts()).

Is it possible there's a double scaling going on where the OS is trying to scale fonts and the application also is, and they're stepping on each other?

@azonenberg
Copy link
Collaborator

Most UI elements are calculated with sizes based on the font size, so as text size scales everything else should scale to match.

So the root cause is likely the font scaling factor being off somehow.

@azonenberg azonenberg linked a pull request Feb 8, 2024 that will close this issue
@rgov
Copy link
Author

rgov commented Feb 10, 2024

Looks great, thanks @d235j!

image

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 a pull request may close this issue.

2 participants