Skip to content

Add Setting for UI Scale Factor #7843

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

regulus79
Copy link
Contributor

This PR adds a slider to the setup dialog/settings window, allowing users to set the QT_SCALE_FACTOR from within LMMS. This is done by calling qputenv to set the environment variable before the QApplication starts.

Demo

lmms_ui_scale_factor_demo.mp4

image

However, there is a problem; I assumed that we wanted to store the scale factor in the config file, but you cannot load the config file until the qApp starts. But you have to set the scale factor env var before the qApp starts for it to take effect. So, I decided to add a temproary qApp object which would be used to load the settings, then set the env var, delete the qApp, and continue with the startup (kind of based on https://stackoverflow.com/a/55408574).

Does anyone have any better idea on how this could be done? Should we even be using the scale factor environment variable for ui scaling?

@regulus79 regulus79 marked this pull request as draft April 14, 2025 23:52
@regulus79
Copy link
Contributor Author

I have converted this PR to draft until a better approach can be found which does not require forcefully setting env variables.

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.

1 participant