fix(btnmatrix): join active, pressed and focused button into active button

This commit is contained in:
Gabor Kiss-Vamosi
2021-02-24 05:10:48 +01:00
parent 326734545b
commit 8cf129b4af
10 changed files with 190 additions and 162 deletions

View File

@@ -18,12 +18,13 @@ void lv_example_scroll_2(void)
{
lv_obj_t * list = lv_obj_create(lv_scr_act(), NULL);
lv_obj_set_size(list, 280, 150);
lv_obj_set_scroll_snap_align_x(list, LV_SCROLL_SNAP_ALIGN_CENTER);
lv_obj_set_scroll_snap_x(list, LV_SCROLL_SNAP_CENTER);
lv_obj_set_layout(list, &lv_flex_queue);
uint32_t i;
for(i = 0; i < 10; i++) {
lv_obj_t * btn = lv_btn_create(list, NULL);
lv_obj_clear_flag(btn, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /* It does similar thing than snapping so disable it.*/
lv_obj_set_size(btn, 150, 100);
lv_obj_t * label = lv_label_create(btn, NULL);