Open GoldenGnu opened 7 years ago
Example of how it looks under 4k:
Workaround idea: Use [Toolkit
](http://docs.oracle.com/javase/6/docs/api/java/awt/Toolkit.html#getScreenSize()) to detect 2k/4k screens and blow up display scaling (scale to 1080p, maybe 1440p, and implement some math to scale to oversized displays.)
Looks like this may have been fixed in Java 9 http://openjdk.java.net/jeps/263 (Due to release in 47 days: http://www.java9countdown.xyz/) Java 9 test builds download: http://jdk.java.net/9/
@jowrjowr If you have time to give jEveAssets a test spin with Java 9, that would be appreciated. If not, that is fine too...
There is no easy way to scale swing. You can scale the font size: https://stackoverflow.com/questions/26877517/java-swing-on-high-dpi-screen most components will scale with the font size. And you can figure out the scale: https://stackoverflow.com/questions/36617892/swing-gui-layout-is-strange-in-4k-panel
I'll give it a shot when the full java 9 gets released.
On Fri, Aug 4, 2017 at 10:24 AM, GoldenGnu notifications@github.com wrote:
Looks like this may have been fixed in Java 9 http://openjdk.java.net/jeps/263 (Due to release in 47 days: http://www.java9countdown.xyz/) Java 9 test builds download: http://jdk.java.net/9/
@jowrjowr https://github.com/jowrjowr If you have time to give jEveAssets a test spin with Java 9, that would be appreciated. If not, that is fine too...
There is no easy way to scale swing. You can scale the font size: https://stackoverflow.com/ questions/26877517/java-swing-on-high-dpi-screen most components will scale with the font size.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GoldenGnu/jeveassets/issues/11#issuecomment-320277701, or mute the thread https://github.com/notifications/unsubscribe-auth/AG-inB3TU-y6elpixBCqa3GFBLJLkCOxks5sUze9gaJpZM4OszBO .
@jowrjowr Found another solution on stackoverflow:
1) Find java.exe 2) Right click -> Properties 3) Go to Compatibility tab 4) Check Override high DPI scaling behavior. 5) Choose System for Scaling performed by:
Notes: You may need to modify javaw.exe like this too If you have time to test this solution, that would be awesome
That said, The scaling problem is fixed in Java 9, but, the jar file needs to be compiled with Java 9, running the current jeveassets.jar that is compiled with Java 8 will not work. It will take some time for me to migrate jEveAssets to Java 9, so, I really hope the solution above fix the problem, until I'm done moving to Java 9
That works!
In case this comes up for anyone, it works for me on Linux under JRE 11 with GDK_SCALE=2 GDK_DPI_SCALE=0.5
.
@mkaito Could you explain that a little more. I don't use Linux often, so, I'm not 100% sure if those are command line arguments or something else. I want to add your workaround to the top post for visibility, but, I have to understand it.
They're environment variables. You use them as such: GDK_SCALE=2 GDK_DPI_SCALE=0.5 <command to run>
, so that they only apply to that command.
@mkaito
I added the workaround to the top post:
GDK_SCALE=2 GDK_DPI_SCALE=0.5 java -jar jeveassets.jar
Thank you 👍
is there a way you can make it look better on a 4k screen things get really smooshed and hard to read
Workaround Windows
1) Find
java.exe
2) Right click -> Properties 3) Go to Compatibility tab 4) CheckOverride high DPI scaling behavior
5) ChooseSystem
forScaling performed by:
Notes: You may need to modify
javaw.exe
like this tooWorkaround Linux
GDK_SCALE=2 GDK_DPI_SCALE=0.5 java -jar jeveassets.jar