Skip to content

Add UI scaling option #98

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

Merged
merged 1 commit into from
May 20, 2025
Merged

Conversation

kblaschke
Copy link
Member

On some platforms/displays, the auto-detected font size might be a bit too small or large, so we should let the user apply a custom scaling factor.

Since the existing sliders in the UI apply their value immediately, I had to add another one that has an apply button, as moving the sslider causes issues if the UI rescales immediately.

@kblaschke kblaschke self-assigned this May 7, 2025
@kblaschke kblaschke added the enhancement New feature or request label May 7, 2025
On some platforms/displays, the auto-detected font size might be a bit too small or large, so we should let the user apply a custom scaling factor.
@revmischa
Copy link
Contributor

Do you think something like https://wiki.libsdl.org/SDL2/SDL_GetDisplayDPI could be useful for getting a default scale size?

@kblaschke
Copy link
Member Author

Do you think something like https://wiki.libsdl.org/SDL2/SDL_GetDisplayDPI could be useful for getting a default scale size?

Tried that, but it was super unreliable and gives hugely different results on different platforms, none of which were really useful for font scaling. Would be great if it actually worked because that would enable the app to properly scale fonts based on the current display, as multiple monitors on the same machine can have different DPI, like an internal display of a laptop and an externally connected monitor as a second display.

DPI scaling is a huge issue with any UI framework that works on more than one OS though, ask the Qt devs about that... 😁

@kblaschke kblaschke merged commit ec1d6f4 into projectM-visualizer:master May 20, 2025
3 checks passed
@kblaschke kblaschke deleted the ui-scaling branch May 20, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants