minor fixes

This commit is contained in:
Gabor Kiss-Vamosi
2021-02-22 11:12:19 +01:00
parent 7197372b19
commit e8179407cd
3 changed files with 11 additions and 3 deletions

View File

@@ -35,7 +35,5 @@ void lv_example_tabview_1(void)
label = lv_label_create(tab3, NULL);
lv_label_set_text(label, "Third tab");
lv_obj_scroll_to_view_recursive(label, LV_ANIM_ON);
}
#endif

View File

@@ -149,6 +149,10 @@ typedef struct {
lv_style_t calendar_day;
#endif
#if LV_USE_COLORWHEEL
lv_style_t colorwheel_main;
#endif
#if LV_USE_MSGBOX
lv_style_t msgbox_btns_bg;
#endif
@@ -441,6 +445,11 @@ static void style_init(void)
lv_style_set_bg_opa(&styles->calendar_day, LV_OPA_COVER);
#endif
#if LV_USE_COLORWHEEL
style_init_reset(&styles->colorwheel_main);
lv_style_set_arc_width(&styles->colorwheel_main, LV_DPX(10));
#endif
#if LV_USE_MSGBOX
/*To add space for the buttons outline*/
style_init_reset(&styles->msgbox_btns_bg);
@@ -850,6 +859,7 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
#if LV_USE_COLORWHEEL
else if(lv_obj_check_type(obj, &lv_colorwheel_class)) {
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->colorwheel_main);
lv_obj_add_style(obj, LV_PART_KNOB, LV_STATE_DEFAULT, &styles->pad_normal);
lv_obj_add_style(obj, LV_PART_KNOB, LV_STATE_DEFAULT, &styles->bg_color_panel);
lv_obj_add_style(obj, LV_PART_KNOB, LV_STATE_DEFAULT, &styles->pad_normal);

View File

@@ -174,7 +174,7 @@ void lv_obj_refresh_style(lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop)
update_cache(obj, part, prop);
lv_obj_invalidate(obj);
if(part == LV_PART_MAIN && (prop == LV_STYLE_PROP_ALL || (prop & LV_STYLE_PROP_LAYOUT_REFR))) {
if((part == LV_PART_ANY || part == LV_PART_MAIN) && (prop == LV_STYLE_PROP_ALL || (prop & LV_STYLE_PROP_LAYOUT_REFR))) {
lv_signal_send(obj, LV_SIGNAL_STYLE_CHG, NULL); /*To update layout*/
} else if(prop & LV_STYLE_PROP_EXT_DRAW) {
lv_obj_refresh_ext_draw_size(obj);