Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux HIDPI support #66

Open
gluon-bot opened this issue Mar 13, 2016 · 10 comments
Open

Linux HIDPI support #66

gluon-bot opened this issue Mar 13, 2016 · 10 comments
Labels
enhancement New feature or request minor

Comments

@gluon-bot
Copy link

Originally reported by: Karel Van Hecke (Bitbucket: karelvanhecke, GitHub: karelvanhecke)


The application is completely unusable with a high resolution display. Since it already has HiDPI scaling on Windows, would it be possible to add HiDPI scaling on linux?


@gluon-bot
Copy link
Author

Original comment by Frederik Bertling (Bitbucket: Burtan, GitHub: Burtan):


I agree that the Scenebuilder is not useable on 4k Linux. However, scaling on Windows and Mac is not achieved by SceneBuilder but by JavaFX. Thus we have to wait until javaFX supports scaling on Linux (scheduled for JavaFX9 afaik) or that Gluon implements custom css scaling for Linux (unlikely to hapen)

@gluon-bot
Copy link
Author

Original comment by Bart van der Bilt (Bitbucket: bbplotters, GitHub: Unknown):


JavaFX9 is released with HiDPi scaling on Linux. Why doesn't it work?

@gluon-bot gluon-bot added minor enhancement New feature or request labels May 9, 2018
abhinayagarwal added a commit that referenced this issue May 9, 2018
Update from OpenJFX SB

Approved-by: Jose Pereda <[email protected]>
Approved-by: Joeri Sykora <[email protected]>
@amalic
Copy link

amalic commented Jul 7, 2021

Any news when this will be fixed?

Here's my workaround for Ubuntu 20.04 LTS based on this Oracle ticket.

I ended up adding a shell-script which launches SceneBuilder after setting GDK_SCALE environment variable.

sudo nano /opt/scenebuilder/bin/SceneBuilderLauncher.sh

#!/bin/bash

export GDK_SCALE=2
/opt/scenebuilder/bin/SceneBuilder "$@"

Then made it executable
sudo chmod +x /opt/scenebuilder/bin/SceneBuilderLauncher.sh

And finally changed what the desktop-launcher is starting
sudo nano /usr/share/applications/scenebuilder-SceneBuilder.desktop

[Desktop Entry]
Name=SceneBuilder
Comment=Scene Builder
Exec=/opt/scenebuilder/bin/SceneBuilderLauncher.sh
Icon=/opt/scenebuilder/lib/SceneBuilder.png
Terminal=false
Type=Application
Categories=Unknown
MimeType=

I am doing the same in my IDE's launch configs for JavaFX apps.

@abhinayagarwal
Copy link
Collaborator

@amalic The oracle ticket linked by you has been fixed in OpenJFX 17. Can you still reproduce the issue while running Scene Builder with JavaFX 17-ea builds?

@amalic
Copy link

amalic commented Jul 7, 2021

Yes. I think it has to do with fractional scaling. GDK_SCALE is per default set to 1.25. My guess is that JavaFX converts it to an integer?

@abhinayagarwal
Copy link
Collaborator

Strange, I can't reproduce the issue when using 125% scaling on Ubuntu 20.04.2 LTS and running from master on JavaFX 17-ea+14.

@amalic
Copy link

amalic commented Jul 7, 2021

Really strange. Maybe it's a driver or version thing (NVidia CUDA drivers, Open JDK 16, ...). Or my second screen which is rotated by 90°>

@abhinayagarwal
Copy link
Collaborator

How are you running Scene Builder?

@amalic
Copy link

amalic commented Jul 8, 2021

I installed the Debian package via apt install. Running it via provided Ubuntu desktop launcher, except for my scaling fix.

@abhinayagarwal
Copy link
Collaborator

abhinayagarwal commented Jul 9, 2021

Hi @amalic ,

Debian package comes with JavaFX version 16. Can you run Scene Builder JavaFX 17-ea+14 to check if the issue is resolved?

Just follow these steps:

  1. Clone scenebuillder repository
  2. Update JavaFX version in root pom.xml to 17-ea+14
  3. run mvn install && mvn javafx:run -f app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minor
Projects
None yet
Development

No branches or pull requests

3 participants