From 4751cb16c91a9769b4eaf6e11e0008b036aa3c14 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 17 Oct 2018 11:27:08 +0200 Subject: [PATCH] minor fixes --- lv_core/lv_obj.c | 4 ++++ lv_objx/lv_list.c | 4 ++-- lv_objx/lv_mbox.c | 2 ++ lv_themes/lv_theme_alien.c | 8 ++++++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index d8cba60c0..abeed35f9 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -778,6 +778,10 @@ void lv_obj_report_style_mod(lv_style_t * style) { lv_obj_t * i; LL_READ(scr_ll, i) { + if(i->style_p == style || style == NULL) { + lv_obj_refresh_style(i); + } + report_style_mod_core(style, i); } } diff --git a/lv_objx/lv_list.c b/lv_objx/lv_list.c index 67c2dd427..c0c994b65 100644 --- a/lv_objx/lv_list.c +++ b/lv_objx/lv_list.c @@ -408,7 +408,7 @@ lv_obj_t * lv_list_get_prev_btn(const lv_obj_t * list, lv_obj_t * prev_btn) if(btn == NULL) return NULL; while(btn->signal_func != lv_list_btn_signal) { - btn = lv_obj_get_child(scrl, prev_btn); + btn = lv_obj_get_child(scrl, btn); if(btn == NULL) break; } @@ -434,7 +434,7 @@ lv_obj_t * lv_list_get_next_btn(const lv_obj_t * list, lv_obj_t * prev_btn) if(btn == NULL) return NULL; while(btn->signal_func != lv_list_btn_signal) { - btn = lv_obj_get_child_back(scrl, prev_btn); + btn = lv_obj_get_child_back(scrl, btn); if(btn == NULL) break; } diff --git a/lv_objx/lv_mbox.c b/lv_objx/lv_mbox.c index 66fbfa3d6..388bfb6e7 100644 --- a/lv_objx/lv_mbox.c +++ b/lv_objx/lv_mbox.c @@ -276,6 +276,8 @@ void lv_mbox_set_style(lv_obj_t * mbox, lv_mbox_style_t type, lv_style_t * style break; } + mbox_realign(mbox); + } diff --git a/lv_themes/lv_theme_alien.c b/lv_themes/lv_theme_alien.c index 13fe40949..386efb61e 100644 --- a/lv_themes/lv_theme_alien.c +++ b/lv_themes/lv_theme_alien.c @@ -136,6 +136,13 @@ static void basic_init(void) } +static void cont_init(void) +{ +#if USE_LV_CONT != 0 + theme.cont = &panel; +#endif +} + static void btn_init(void) { #if USE_LV_BTN != 0 @@ -785,6 +792,7 @@ lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font) } basic_init(); + cont_init(); btn_init(); label_init(); bar_init();