LVGL v5.2 brings substantial improvements to the graphics library with new object types, enhanced drawing capabilities, expanded image format support, and numerous object-specific features.
New Objects#
This release introduces four new widgets:
- Image button - Buttons with custom image states
- Calendar - Date picker and display widget
- Arc - Curved progress indicators and controls
- Preloader - Animated loading indicators
Drawing and Rendering#
Major improvements to the graphics rendering engine:
- Line draw algorithm improved to support perpendicular line endings
- Arc drawing - native support for curved shapes
- Shadow drawing enhancements for better visual quality
- Custom VDB write function can be registered in the display driver to support non-standard color formats, allowing VDB content to be directly flushed to the display
- RGB565 swap to swap the two bytes of RGB565 colors, making it possible to send pixel data via an 8-bit serial interface (e.g., SPI). Enable in
lv_conf.hwithLV_COLOR_16_SWAP - VDB address can be set at runtime with
lv_vdb_set_adr(), useful for DMA-based display drivers where VDB needs specific memory allocation - New image formats supporting indexed and grayscale formats to save memory
- Image decoder interface to add support for any image format like PNG
- Dithering support in Online image converter
New Object Features#
lv_obj#
- Opacity scale attribute added to scale the current opacity of an object and its children, useful for fading in/out groups of objects
lv_label#
LV_LABEL_ALIGN_RIGHTadded to enable right alignment of textLV_LABEL_LONG_CROPlong mode to simply crop text outside the label's bounds
lv_btn#
- Ink effect feature added to play an animation effect when a button is clicked and released. Configure with
lv_btn_set_ink_in_time(),lv_btn_set_ink_wait_time(),lv_btn_set_ink_out_time()(requiresLV_BTN_INK_EFFECTenabled inlv_conf.h)
lv_page, lv_win, lv_ta#
- Scrolling added on
LV_GROUP_KEY_UP/DOWN/LEFT/RIGHTfor keyboard/encoder navigation - lv_page: Temporal scrollbar hide option added (
LV_SB_MODE_HIDE) - lv_ta:
max_lengthandaccepted_charsattributes added - lv_ta: Action callbacks can be added with
lv_ta_set_action()
Other New Features#
- SYMBOL_DUMMY: If added before a string,
lv_imgwill display text instead of an image, allowing text to be used where icons are expected - Monospace font support (set the width in the Online converter)
LV_FONT_CUSTOMdefine added inlv_conf.hto enumerate custom fonts and make them globalLV_CONF_INCLUDE_SIMPLE: define as a compiler symbol to includelv_conf.has#include "lv_conf.h"instead of using relative paths- Click focus: objects in a group can be focused when clicked by a pointer input device (mouse or touchpad)
LV_GROUP_KEY_DELkey added- Log system added to print debug information
- Uniscii monospace font added as built-in font
- Edit/Navigate mode for objects in a group, useful for encoder-based navigation
- Character encoding interface simplified for adding encodings beyond built-in UTF-8
LV_INDEV_TYPE_ENCODER: New encoder input device type (Left/Right/Push)- Option to use your existing tick handler instead of
lv_tick_inc(seelv_conf_templ.h) - Themes can be changed at runtime (set
LV_THEME_LIVE_UPDATEinlv_conf.h) - New theme: Nemo
lv_fs_truncandlv_fs_renameadded to filesystem interface
