Skip to content

Conversation

@LucF120
Copy link

@LucF120 LucF120 commented Mar 10, 2025

Suggested addition for isssue #189
An issue on certain resolutions is that the GUI is too small to see. The current workaround is to execute the jar using java -Dsun.java2d.uiScale=2.0 -jar rars1_6.jar

This PR adds the "Scale GUI" button to the settings tab. Clicking "Scale GUI" relaunches the jar with the flag -Dsun.java2d.uiScale=2.0.

I created the SettingsScaleAction class in the src/rars/venus/settings directory, and added it to src/rars/venus/VenusUI.java. SettingsScaleAction finds the absolute path of the jar file, and creates a new process with the -Dsun.java2d.uiScale=2.0 flag. If the absolute path could not be found or the jar cannot be executed, the current process will not crash.

This has been tested on Linux and Windows.

@LucF120 LucF120 changed the title Issue #189: Added GUI scale button to settings Issue #189 Enhancement: Added GUI scale button to settings Mar 10, 2025
@manchicken
Copy link

This is great. I know that you can pass the uiScale in if you're using the jar file, but this seems like it could also improve life for those who're running the Flatpak where the workaround is a lot less straight-forward.

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