问题描述
嗨,我使用了Webots,发现不仅场景树视图中的文本而且弹出窗口都非常小。
我尝试更改显示分辨率,但发现只有一个可用的(3840x2160)和xrandr
无法解决问题。
Webots中的“首选项”都不能设置显示的字体大小。
xrandr设置
seanlu@seanlu-HP-ZBook-15-G6:~$ xrandr -q
Screen 0: minimum 8 x 8,current 3840 x 2160,maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
3840x2160 60.00*+ 40.00
DP-2 disconnected (normal left inverted right x axis y axis)
seanlu@seanlu-HP-ZBook-15-G6:~$ cvt 1920 1080 60
# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
seanlu@seanlu-HP-ZBook-15-G6:~$ xrandr --newmode 1920x1080 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
seanlu@seanlu-HP-ZBook-15-G6:~$ xrandr -q
Screen 0: minimum 8 x 8,maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
3840x2160 60.00*+ 40.00
DP-2 disconnected (normal left inverted right x axis y axis)
1920x1080 (0x270) 173.000MHz -HSync +VSync
h: width 1920 start 2048 end 2248 total 2576 skew 0 clock 67.16KHz
v: height 1080 start 1083 end 1088 total 1120 clock 59.96Hz
seanlu@seanlu-HP-ZBook-15-G6:~$ xrandr --addmode DP-2 1920x1080
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 18 (RRAddOutputMode)
Serial number of failed request: 35
Current serial number in output stream: 36
PC信息
- 类型:HP ZBook 15 G6
- OS:内核为5.4.0-48-generic的Ubuntu 18.04
- 图形卡:NVidia Quadro T1000
- NVidia驱动程序:NVIDIA-SMI 450.80.02
能否以适当的大小显示文本?
任何建议将不胜感激!
解决方法
我确认这是 linux 中的一个简单修复,如评论中所述,我更改了保存在 $(WEBOTS_HOME)/resources/stylesheet.linux.qss
中的 CSS 样式表。我只是将像素 px
的所有不可缩放引用更改为点 pt
。通过搜索和替换轻松完成。根据我的喜好,它们有点大,所以我将它们全部缩小了 1 点。这样我就不必弄清楚每种特定风格所指的是什么。
font-size: 11px
更改为 font-size: 11pt