1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

page: copy styles in create

This commit is contained in:
Gabor Kiss-Vamosi 2020-05-06 10:55:33 +02:00
parent 64fdfbe13f
commit d6b85d16cf

View File

@ -141,15 +141,16 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy)
ext->scrl = lv_cont_create(page, copy_ext->scrl); ext->scrl = lv_cont_create(page, copy_ext->scrl);
lv_obj_set_signal_cb(ext->scrl, lv_page_scrollable_signal); lv_obj_set_signal_cb(ext->scrl, lv_page_scrollable_signal);
lv_style_list_copy(&ext->scrlbar.style, &copy_ext->scrlbar.style);
#if LV_USE_ANIMATION
lv_style_list_copy(&ext->edge_flash.style, &copy_ext->edge_flash.style);
#endif
/* Add the signal function only if 'scrolling' is created /* Add the signal function only if 'scrolling' is created
* because everything has to be ready before any signal is received*/ * because everything has to be ready before any signal is received*/
lv_obj_set_signal_cb(page, lv_page_signal); lv_obj_set_signal_cb(page, lv_page_signal);
lv_obj_set_design_cb(page, lv_page_design); lv_obj_set_design_cb(page, lv_page_design);
// lv_page_set_style(new_page, LV_PAGE_STYLE_BG, lv_page_get_style(copy, LV_PAGE_STYLE_BG));
// lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, lv_page_get_style(copy, LV_PAGE_STYLE_SCRL));
// lv_page_set_style(new_page, LV_PAGE_STYLE_SCRLBAR, lv_page_get_style(copy, LV_PAGE_STYLE_SCRLBAR));
lv_page_set_scrlbar_mode(page, copy_ext->scrlbar.mode); lv_page_set_scrlbar_mode(page, copy_ext->scrlbar.mode);
} }