Issue #189 Enhancement: Added GUI scale button to settings #227
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.