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

Remove -Dsun.java2d.uiScale.enabled=false on Windows #231

Closed
processing-bot opened this issue Aug 1, 2021 · 9 comments
Closed

Remove -Dsun.java2d.uiScale.enabled=false on Windows #231

processing-bot opened this issue Aug 1, 2021 · 9 comments
Labels
help wanted Extra attention is needed windows

Comments

@processing-bot
Copy link
Collaborator

Created by: benfry

As I understand it, setting -Dsun.java2d.uiScale.enabled is a sort of hack/workaround to avoid making code HiDPI compliant. I tried shutting it off in alpha 5 and 6, but we ran into issues like #226, especially with fractional sizes. (Another report, not submitted here, was that the UI looked dreadful/blocky at 125% after this flag was removed.)

So the flag has been re-enabled for alpha 7 beta 1 with 383b4b8

This isn't a new problem, and requires some work to fix properly, even for a project like IntelliJ (who, unlike us, has a paid team of engineers working on these things) https://intellij-support.jetbrains.com/hc/en-us/articles/115001260010-Troubleshooting-IDE-scaling-DPI-issues-on-Windows

I haven't enough time to really dig into this on Windows, so as with so many things, PRs and fixes welcome.

@processing-bot
Copy link
Collaborator Author

Created by: soprano

There is currently no alpha 7 and this is not fixed in 4.0b1.

@processing-bot
Copy link
Collaborator Author

Created by: benfry

Edited my text to indicate strike out alpha 7 and replace with beta 1. The issue will remain open until it's fixed or otherwise resolved.

@processing-bot
Copy link
Collaborator Author

Created by: tristanbay

Is there a way to set the flag back to true in the meantime without having to rebuild the IDE so that I don't have to override the high DPI setting so the UI won't break? The override makes it huge. (I use a 1080p laptop, but since it's 15.6", I still have my Windows UI scaling set to 140%)

@processing-bot
Copy link
Collaborator Author

Created by: benfry

Offhand, you might try grabbing the processing.exe from the alpha where it worked; that may be the only change in its config.

@processing-bot
Copy link
Collaborator Author

Created by: tristanbay

Offhand, you might try grabbing the processing.exe from the alpha where it worked; that may be the only change in its config.

So you're saying I should downgrade to 4.0 alpha 4, where the UI scaling issues don't occur?

@processing-bot
Copy link
Collaborator Author

Created by: benfry

No, just replace the processing.exe file in the beta 2 folder with the one from the alpha 4 folder. (And let me know if that works.)

@processing-bot
Copy link
Collaborator Author

Created by: tristanbay

No, just replace the processing.exe file in the beta 2 folder with the one from the alpha 4 folder. (And let me know if that works.)

I replaced both processing.exe and processing-java.exe with the ones from 4.0a4 and it seems to have fixed/mostly fixed the issue (i.e. the stop, start, and debug buttons are still a bit blurry and pixel-y when changing the internal UI scaling beyond 100% but everything else is fine).

I also wanted to mention that I modified the theme.txt file in the lib folder of the program file directory to make the UI colors a bit easier on the eyes and to add a little bit of consistency between a couple of the elements. I still think it needs one or more minor changes from what I have so far but if you could point me to where I should submit it so that other contributors/devs can consider adding the changes I made to the theme into an official download for a later version of Processing, that would be great.

Thank you for your help!

@processing-bot
Copy link
Collaborator Author

Created by: benfry

Adding a “Disable HiDPI Scaling” option in Preferences for 4.0 beta 3. It's a temporary solution, but resolves the immediate issue for now.

Further development for a better long-term solution will be covered here: #342

@processing-bot
Copy link
Collaborator Author

Created by: github-actions[bot]

This issue has been automatically locked. To avoid confusion with reports that have already been resolved, closed issues are automatically locked 30 days after the last comment. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed windows
Projects
None yet
Development

No branches or pull requests

1 participant