I am in the progress of migrating an app from v7 to v8. So far most issues could be solved. But so far I have two issues which I wasn’t able to solve so far:
Labels in “LONG_WRAP” mode aren’t centered anymore when using set_align(lv.ALIGN.CENTER). Instead the individual lines are left aligned.
label = lv.label(page)
label.set_text("This is a long line that will wrap and should be centered.");
label.align(lv.ALIGN.TOP_MID, 0, 0)
The keyboard has a cancel event but there is no cancel button in the default layouts anymore (or i am too stupid to see it). Do I now have to provide a complete custom button layout if I’d like to see the cancel button?
Labels of (too) small buttons aren’t centered properly anymore.
One further question, please: lv.win.close_event_cb is gone. How is a windows close button now supposed to be used to close a window? The window object also has no close member or similar. Is win.del_async() the way to go?
And another one: Window now has a add_title method instead of set_title. And this new method actually adds another title. How do i now update the title? Get access to the header and its label and update that manually?
The only non obvious thing is how to get the window from the button. In the button’s event you see the button and need to get the parent’s parent to get the window. lv_win_get_from_button() could be moew flexible.
But the suggested VALUE_CHANGE callback only fires when the user has changed the selection so this cannot be used to style the list. I think the docs should suggest to use CLICKED instead as this fires when the list is being drawn.
There’s also a CI test that checks every push/pull-request on LVGL by building the latest lv_micropython with the new LVGL and running all Python examples.
So if CI tests pass it’s generally very safe to assume that the new LVGL would work with latest lv_micropython.