窗口标题字体太大

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

Window title font too big

问题

标题栏字体太大,如何调小?

英文:
TL;DR

Size of font in title bar of Swing windows is too big. How can I make it smaller?

Details

Oracle Java 1.8.0_201 (32 bit)

I have a Dell laptop.
Windows 11 Pro (version 22H2)
Processor: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz 1.50 GHz
Installed RAM: 16.0 GB (15.4 GB usable)

I am using a virtual desktop via Citrix. Virtual desktop has Windows 10 (Enterprise, 64 bit). It also has 16 GB of memory.

Below is a screen capture of a JOptionPane on the virtual desktop.

窗口标题字体太大

This is correct and how it should be.
However, on another computer, using the same configuration as described above, it looks different. Here is a screen capture of the other computer. Note that the other computer is the exact same laptop as mine.

窗口标题字体太大

The main problem is that the size of the font of the window title is bigger than it should be. How can I make it smaller?

Note that the displays of both computers are the same, i.e. scaling is set to 100% and screen resolution is 1920×1080
Are there other settings that I should check?

Also note that both computers use a dual monitor docking station as demonstrated in this YouTube video.

EDIT

Granted, regarding the screen captures above, the differences don't impact the GUI, however they do impact the main application window, i.e. the application's top-level JFrame as shown in below screen capture.

窗口标题字体太大

I have purposely removed the window title (for confidentiality purposes), however the font size is larger than it should be and as a result, the toolbar at the bottom of the window is only partially displayed and this is the problem. The JFrame dimensions are fixed (i.e. hard coded) and since the window title takes up more height (due to the larger font size), it comes at the expense of the toolbar height. Changing the window dimensions – including removing them entirely in order to let Swing determine the optimal window size – is not an option. Hence I believe that the solution is to reduce the size of the font used in the window title bar.

The application was purchased from a third party. It runs on thousands of computers with the exact same configuration as mine (as described above, including the exact same Dell laptop and virtual desktop) but the problem occurs on only a very few (less than ten). Also, the application has been in use for several years, initially on PCs. The problem only began when we moved from each person having his own, dedicated [physical] PC to the environment described above, i.e. a virtual desktop on a laptop in a dual monitor docking station.

EDIT 2 (15<sup>th</sup> May, 2023)

To clarify regarding the virtual desktop. Via Citrix desktop we are connecting to an actual, physical computer and not a virtual computer, hence the display settings are those of the physical computer.

答案1

得分: 0

在Windows 10中,如果您移动到左下角并键入“ease of access display settings”,您将获得以下设置页面:

确保“Make text bigger”滑块在最左侧。

请告诉我在Windows 11中是否类似。

英文:

In Windows 10, if you go to the bottom left and type "ease of access display settings", you'll get the following settings page:

窗口标题字体太大

Make sure the "Make text bigger" is all the way to the left.

Let me know if this is similar in Windows 11.

答案2

得分: 0

我找到的一种解决问题的方法。

  1. 在物理计算机的桌面上右键单击(该计算机显示为 Citrix 虚拟桌面),然后从菜单中选择 显示设置

  2. 显示设置 窗口中,单击 高级显示设置

  3. 高级显示设置 窗口中,单击 文本和其他项目的高级大小

  4. 显示 窗口中,选择 标题栏 的较小尺寸。
    (我选择了 8。)

结果是 [Swing] JFrame 的标题栏高度减小,从而导致工具栏不再被切断。

英文:

One way I found to resolve the problem.

  1. Right click on the desktop (of the physical computer that is displayed as a Citrix virtual desktop) and select Display Settings from the menu.

窗口标题字体太大

  1. In the Display Settings window, click on Advanced display settings.

窗口标题字体太大

  1. In the Advanced display settings window click on Advanced sizing of text and other items.

窗口标题字体太大

  1. In the Display window, select a smaller size for Title bars.
    (I selected 8.)

窗口标题字体太大

The result is that the title bar of the [Swing] JFrame has less height which results in the toolbar not being cut off.

huangapple
  • 本文由 发表于 2023年5月11日 14:12:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/76224619.html
匿名

发表评论

匿名网友

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

确定