GoldenGnu / jeveassets

jEveAssets is an out-of-game asset manager for Eve-Online, written in Java
http://eve.nikr.net/jeveasset
GNU General Public License v2.0
156 stars 38 forks source link

jEveAssets looks bad on 4K monitors #11

Open GoldenGnu opened 7 years ago

GoldenGnu commented 7 years ago

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) Check Override high DPI scaling behavior 5) Choose System for Scaling performed by:

Notes: You may need to modify javaw.exe like this too

Workaround Linux

GDK_SCALE=2 GDK_DPI_SCALE=0.5 java -jar jeveassets.jar

jowrjowr commented 7 years ago

Example of how it looks under 4k:

http://i.imgur.com/pzPSHPL.png

MordecaiMalignatus commented 7 years ago

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.)

GoldenGnu commented 7 years ago

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

jowrjowr commented 7 years ago

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 .

GoldenGnu commented 7 years ago

@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

jowrjowr commented 7 years ago

That works!

mkaito commented 4 years ago

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.

GoldenGnu commented 4 years ago

@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.

mkaito commented 4 years ago

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.

GoldenGnu commented 4 years ago

@mkaito I added the workaround to the top post: GDK_SCALE=2 GDK_DPI_SCALE=0.5 java -jar jeveassets.jar Thank you 👍