Documentation for LVGL? Sources?

Hi there,

Obviously, there are different LVGL versions around AND you can configure the LVGL installation according to your needs. This makes the official LVGL documentation rather useless (plus, it focuses more on the C interface than on the Python interface).
Are the LVGL sources somewhere available so that we can look up things in the source code directly?

Currently, I am struggling, how the bar component is being styled (border radius, colors). If you have specific information on this, that would be helpful as well.

Thank you,

Tobias

Hello Tobias,

We will answer your questions.

  1. The lvgl version used in the current project is 9.1
  2. If you want to find content directly in the source code, I recommend you to refer to the following documents and source code for development.

Note: When viewing the source code, make sure that the corresponding version of lvgl is 9.1 to avoid using other versions of code to develop and cause program errors.

  1. Set the style of the bar component (border radius, color)
    The settings of the bar component (lv.obj) in micropython can be referred to as follows:
    obj = lv.obj(parent)
    obj.set_style_radius(3, 0) # Set the border radius to 3
    obj.set_style_border_width(2, 0) # Set the border width to 2
    obj.set_size(320, 240) Set the component size
    obj.set_style_bg_color(lv.color_hex(0xFFFFFF), 0) Set component color

In addition, you can use the simulator LVGL/MicroPython Simulator to draw and test the UI.

If you have any questions about the product, please feel free to leave a message.