Menu

#1491 Resolution, 4k unreadable

SQuirreL
open
nobody
resolution (1)
medium
2022-09-27
2021-11-02
derocco
No

I face trouble with squirrel since yesterday with reslution.
I have a 4k internal screen and HD externa.

No matter if i have external connected or not squirrel new start with such a tiny font that i need glasses to see the menue.

On startup splash windows first comes in "normal" size, then gets smaller and when the app opens its all tiny tiny.

Is there a conf file where i can change back resolution somehow.

that version worked on this maschine for a long time with no issue at all.

Discussion

  • Stanimir Stamenkov

    derocco, what SQuirreL and Java versions are you using, what OS?

     
  • Claus

    Claus - 2021-11-03

    I use a 32" 2.5k screen with Adopt Open JDK 16x64
    It runs inside Windows Server 2012R2 and since a few weeks Server 2019.
    It works fine in my setup. Can you provide some screenshots? Do you use a "look and feel"? There are some that can result to such a small font. Also there is a option in global preferences where you can change default font sizes.

     
  • derocco

    derocco - 2021-11-03

    I use 4.1.0 Squirrel
    With
    java version "1.8.0_271"
    Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
    Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode)

     

    Last edit: derocco 2021-11-03
    • Stanimir Stamenkov

      Java 8 is not really hidpi screen aware. You need Java 11+ to get correct sizing on hidpi screens. If you have Java 11+ installed, include at the begining of squirrel-sql.bat, after the @echo off line:

      SET JAVA_HOME=C:\<path_to_java11+>
      

      Note, SQuirreL 4.1.0 is now somewhat outdated. 4.2.0 (still Java 8 compatible) ships with nice new FlatLaf look-and-feel (need to be selected explicitly in the Preferences) that has light and dark themes, and user themes could easily be added. The last release is 4.3.0 – requires Java 11+.

       
      👍
      1
  • derocco

    derocco - 2021-11-03

    as a workaround i need to close notebook, use extrenal fullhd screen open squirrel and then open notebook again and move the windows.

    But what do i do on the road when i dont have an external screen...
    Must be some confsetting that detects screen size and then chooses app size.

    I have another 43" 4k screen there i might be able to use with this settings. But on a 14" notebook. Inpossible.
    Is it possible it somehow saved the 43" screen dimenions somewhere and then thinks the notebook screen is that one.`?

     
  • Claus

    Claus - 2021-11-03

    Hi,
    I found the following in superuser.com:

    The problem here seems to be that Swing is by default claiming that it is DPI aware, so windows doesn't scale it. Use this switch to turn off this behavior and windows will start scaling your swing app:

    -Dsun.java2d.dpiaware=false
    [EDIT: Unfortunately, this flag no longer seems to work in Java 8, I was testing it in Java 6. Looks like this is a known issue.]

    [EDIT 2: You can modify a Java 8 install to work correctly, using a program to modify the EXE manifests. I changed the setting from true to false in the manifests inside of java.exe and javaw.exe, and now my Swing programs scale correctly in Windows 10 high dpi. I used Resource Tuner to this.]

    [Edit 3] Just use Java 9

    Have you tried Java 16 like me?

     
  • derocco

    derocco - 2021-11-03

    Java 16? I have set:
    C:\Program Files\Java\jre1.8.0_311

     
  • derocco

    derocco - 2021-11-03

    hmm if i start it over the bat file i have the issue. When i start by clicking the jar file i dont face the issue.
    Very strange.

    @echo off
    
    @rem IZPACK_JAVA is filtered in by the IzPack installer when this script is installed
    set "IZPACK_JAVA=%JAVA_HOME%"
    
    @rem We detect the java executable to use according to the following algorithm:
    @rem
    @rem 1. If the one used by the IzPack installer is available then use that; otherwise
    @rem 2. Use the java that is in the command path.
    @rem 
    
    if exist "%IZPACK_JAVA%\bin\javaw.exe" (
      set "LOCAL_JAVA=%IZPACK_JAVA%\bin\javaw.exe"
    ) else (
      set LOCAL_JAVA=javaw.exe
    )
    
     
  • Claus

    Claus - 2021-11-03

    Check which Java Version is running if you start program as jar using
    java -version
    in any command line. This will your default java

    add the same inside your bat and check again.

    My suggestion: Use Java 16 like me. It works fine.

     
  • derocco

    derocco - 2021-11-03

    are we talkiung about a jre or an SDK?
    Because here: https://www.java.com/de/download/
    I see that i have the most recent jre

    java version "1.8.0_311"
    Java(TM) SE Runtime Environment (build 1.8.0_311-b11)
    Java HotSpot(TM) 64-Bit Server VM (build 25.311-b11, mixed mode)

     

    Last edit: derocco 2021-11-03
    • Stanimir Stamenkov

      JRE or JDK – SQuirreL should be fine with any (doesn't require JDK as far as I'm aware). As far as I know Oracle doesn't publish JRE packages after Java 8, that's why you're not seeing newer versions on Java.com. As Claus pointed out you could obtain newer up-to-date Java versions from:

       
  • Nick Fenwick

    Nick Fenwick - 2022-09-26

    I ran into a solution that I think does "the right thing" to solve this problem, which is to change the whole app's DPI scaling instead of trying to configure fonts to specific sizes.

    https://superuser.com/a/1194728/212637

    java -Dsun.java2d.uiScale=2.5 -jar ~/jars/NearInfinity.jar
    

    I'm not familiar with modifying SquirrelSQL's params but I found in squirrel-sql.sh there is use of $SQUIRREL_SQL_OPTS just after the classpath on the Java command line, so I set:

    export SQUIRREL_SQL_OPTS=-Dsun.java2d.uiScale=2.5
    

    SquirrelSQL now runs with nice large toolbars, menus, editors etc with no need to fiddle with font settings.

    My context: I'm running Gnome3 on Fedora 36 using X11 (not Wayland) with two 4k monitors set to "Scale: 200%" in the "Display" Gnome Settings and Sun/Oracle Java 17. Thus, Gnome is scaling everything up 200% but Squirrel (and all Java Swing apps) appear unscaled with tiny menu bars, toolbars, icons, fonts etc.

     

    Last edit: Nick Fenwick 2022-09-26
  • Gerd Wagner

    Gerd Wagner - 2022-09-27

    Nick, thanks for the pointer. I added it to our trouble shooting section, see
    https://squirrelsql.org/#installation

     
    👍
    1
  • Gerd Wagner

    Gerd Wagner - 2022-09-27

    Nick, thanks for the pointer. I added it to our trouble shooting section, see
    https://squirrelsql.org/#installation

     

Log in to post a comment.

MongoDB Logo MongoDB