在 IntelliJ Idea Community 中在 HiDPI 屏幕上运行 Swing 应用程序。

huangapple go评论64阅读模式
英文:

Running Swing apps in IntelliJ Idea Community on a HiDPI screen

问题

我在XPS13上运行Arch Linux,分辨率为3200x1800,使用I3窗口管理器。

我目前正在开发一些Swing应用程序。当我通过命令行运行java -Dsun.java2d.uiScale=2 myApp来运行我的应用程序时,应用程序会进行缩放(否则它会显得太小)。

我在vmoptions文件中也有相同的一行代码,但由于某种原因,IntelliJ Idea在我运行应用程序时没有对我的Swing应用程序进行放大。

我该如何让IntelliJ Idea对我的Swing应用程序进行放缩?

英文:

I run Arch Linux with I3 on an XPS13 with 3200x1800 res screen.

I'm currently working on some Swing apps. When I run my app from the commandline with the java -Dsun.java2d.uiScale=2 myApp, the app is scaled (else it's just too small).

I also have the same line in my vmoptions file, but for some reason IntelliJ Idea does not upscale my Swing app when I run it.

How can I get IntelliJ idea to scale my Swing app?

答案1

得分: 2

在运行/调试配置的VM选项字段中指定缩放选项。.vmoptions文件用于IntelliJ IDEA本身,而不是用于您的应用程序。

英文:

Specify the scaling option in the VM options field of the Run/Debug configuration. .vmoptions file is used for IntelliJ IDEA itself, not for your apps.

huangapple
  • 本文由 发表于 2020年8月21日 01:01:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/63509919.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定