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 scaling #188
Comments
Is there any workaround for now? |
Only manually set system parameter -Dsun.java2d.uiScale=2.0 |
Tried specifying "-Dsun.java2d.uiScale=2.0" in IDEA Run Configurations VM options, does not work. |
System properties which are set by IDEA Run Configuration are visible only to gradle. If they should be visible to application, we need to define them in build.gradle.kts:
|
Still don't work on Linux |
By the way, don't call any Otherwise DPI will not be set. If you call these kind of functions, you should call |
I'm using Ubuntu with Gnome, all latest, I tried the simplest app created by IDEA, the "Hello, Desktop" button is so small in both Wayland and X11. And I added "jvmArgs("-Dsun.java2d.uiScale=2.0")" like you said, then noting happened. Might be something wrong? And I tried your example app "todoapp", it scaled correctly, but I can't find any code about hidpi in the project, even jvmArgs, why? |
IDEA uses the old version |
Now we find the problem. How could I update the version? |
I found it, in build.gradle.kts->plugins. Maybe I should update my IDEA to preview version for always getting default latest compose version. |
IDEA will be always behind the latest version of Compose, even Preview version (but it gets the updated version faster, we usually change it after releasing the stable version of Compose) |
I can't get it to scale on Ubuntu 21.04. I've tried the todo app and some of the suggestions here. It always looks tiny! |
The IDEA itself looks fine though. |
GDK_SCALE=2 as an environment variable will help. |
Nah it doesn't. Maybe because im under KDE. BTW with wayland scaling is ok out of the box. |
Ok, for me it helped under debian testing (bookworm) wayland Gnome |
This is an issue only when running in debugging mode for me, when i run this in release mode it works properly
This was on PopOs with wayland |
Ditto for me on Fedora 37 Wayland. The normal interactive run button in IntelliJ renders an application very small. |
FYI, I believe scaling used to be ok in Jetbrains Toolbox (which is written with Compose itself) until a few versions ago, but now the toolbox fonts render ridiculously small compared to other windows on a 2560x1440 pixel display. I'm also on Fedora 38 on Wayland. |
Hi everyone, I was facing the same issue whenever I'm switch from my monitors to laptop screen. Having read the above comment, running with |
It would be great, if Wayland's Fractional scale protocol was supported. Nowadays, monitors come with quite odd PPI's, that integer HiDPI scaling isn't particularly usable anymore. The 2x makes everything too big, but 1x makes everything too small. Besides the odd PPI of modern displays, fractional scaling helps with accessibility - some people scale normal DPI displays to 125%. |
One thing I haven't tested, but might help, is trying the jbr (jetbrains runtime) as a JDK/JRE, as I believe it contains certain fixes/improvement for the Java display stuff (explicitly listing HiDPI) and that's what the toolbox ( |
Given that JetBrains ToolBox (which AFAIK runs on JBR) has the same issues, I doubt that's going to help. |
UI is not upscaled properly on some Linux desktops. Would be useful if compose-jb could use same logic as Intellij uses (ref)
Intellij
show hidpi info
content:The text was updated successfully, but these errors were encountered: