Webot UI text too small

321 views Asked by At

Webots UI text is too small

Hi, I used Webots and I found that not only the texts in scene tree view but the pop-up window are extremely small.
I tried to change my display resolution but I found that only one available (3840x2160), and xrandr can't solve the question.
The Preference in Webots either can't set the font size for display.

xrandr setting

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:  36

PC Info

  • Type: HP ZBook 15 G6
  • OS: Ubuntu 18.04 with kernel 5.4.0-48-generic
  • Graphics card: NVidia Quadro T1000
  • NVidia driver: NVIDIA-SMI 450.80.02

Is it possible to make the text display in appropriate size?
Any suggestions would be greatly appreciate!

1

There are 1 answers

0
Blue Shrapnel On

I confirm this was a simple fix in linux, as mentioned in the comments, I changed the CSS stylesheet saved in $(WEBOTS_HOME)/resources/stylesheet.linux.qss. I simply changed all the non-scalable references to pixels px to points pt. Easily done with a search and replace. They were a little large for my liking so I scaled them all down by 1 point. This way I didn't have to work out what each particular style referred to.

font-size: 11px changed to font-size: 11pt