AutoScaling UI on LVGL

I would definitely add x * LV_HOR_RES / 1000 becasue:

  • It’s simple
  • It’s not possible now (lv_pct() uses the parent width/height, not the screen’s height)

FYI, I’m also planning to add:

  • ch unit: width of the ‘0’ character with the given font
  • em: height of the given font
  • aspect-ratio: e.g. width=aspect-ratio(2.0) make the width 2 times larger than the height. It’s very useful to create always-square widgets.

Thats great! i am glad that my idea was useful

1 Like

I’ve just added these to the ROADMAP.

2 Likes