fix(btnmatrix): join active, pressed and focused button into active button
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user