
嗨,我使用了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, 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)
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: 36PC信息
5.4.0-48-generic
是否有可能使文本显示在适当的大小?
任何建议都将不胜感激!
发布于 2021-03-01 16:01:23
我确认这在linux中是一个简单的修复,正如注释中提到的,我更改了保存在$(WEBOTS_HOME)/resources/stylesheet.linux.qss中的CSS样式表。我只是将所有不可伸缩的对像素px的引用更改为pt点。通过搜索和替换就可以轻松完成。我觉得它们有点大,所以我把它们都缩小了1分。这样我就不需要弄清楚每一种特定的风格所指的东西。
font-size: 11px改为font-size: 11pt
https://stackoverflow.com/questions/64327702
复制相似问题