v8.0.0 is released
Written by
kisvegabor
on
v8.0 brings many new features like simplified and more powerful scrolling, new layouts inspired by CSS Flexbox and Grid, simplified and improved widgets, more powerful events, hookable drawing, and more.
v8 is a major change and therefore it’s not backward compatible with v7.
Directory structure
- The
lv_
prefix is removed from the folder names - The
docs
is moved to thelvgl
repository - The
examples
are moved to thelvgl
repository - Create an
src/extra
folder for complex widgets:- It makes the core LVGL leaner
- In
extra
we can have a lot and specific widgets - Good place for contributions
Widget changes
lv_cont
removed, layout features are moved tolv_obj
lv_page
removed, scroll features are moved tolv_obj
lv_objmask
the same can be achieved by eventslv_meter
added as the unioin oflv_linemeter
andlv_gauge
lv_span
new widget mimicing HTML<span>
lv_animing
new widget for simple slideshow animations- + many minor changes and improvements
New scrolling
- Support “elastic” scrolling when scrolled in
- Support scroll chaining among any objects types (not only
lv_pages
s) - Remove
lv_drag
. Similar effect can be achieved by setting the position inLV_EVENT_PRESSING
- Add snapping
- Add snap stop to scroll max 1 snap point
New layouts
- CSS Grid-like layout support
- CSS Flexbox-like layout support
Styles
- Optimize and simplify styles
- State is saved in the object instead of the style property
- Object size and position can be set in styles too
Events
- Allow adding multiple events to an object
- A
user_data
can be attached to the added events
Driver changes
lv_disp_drv_t
,lv_indev_drv_t
,lv_fs_drv_t
needs to bestatic
...disp_buf...
is renamed todraw_buf
. See an initialization example here.- No partial update if two screen sized buffers are set
disp_drv->full_refresh = 1
makes always the whole display redraw.hor_res
andver_res
need to be set indisp_drv
indev_read_cb
returnsvoid
. To indicate that there is more that to read setdata->continue_reading = 1
in theread_cb
Other changes
- Remove the copy parameter from create functions
- Simplified File system interface API
- Use a more generic inheritance
- The built-in themes are reworked
lv_obj_align
now saved the alignment and realigns the object automatically but can’t be used to align to other than the parentlv_obj_align_to
can align to an object but doesn’t save the alignmentlv_pct(x)
can be used to set the size and position in percentage- There are many other changes in widgets that are not detailed here. Please refer to the documentation of the widgets.
New release policy
- We will follow Release branches with GitLab flow
- Minor releases are expected in every 3-4 month
master
will always contain the latest changes
Migrating from v7 to v8
- First and foremost, create a new
lv_conf.h
based onlv_conf_template.h
. - To try the new version it’s recommended to use a simulator project and see the examples.
- When migrating your project to v8
- Update the drivers are described above
- Update the styles
- Update the events
- Use the new layouts instead of
lv_cont
features - Use
lv_obj
instead oflv_page
- The other parts are mainly minor renames and refactoring. See the functions’ documentation for descriptions.