From 356b26eabee6d56602db0035972bac176ce02347 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 7 Jun 2021 21:16:48 +0200 Subject: [PATCH] fix(theme) fix the switch style in deafult theme LVGL didn't see that the styles were changed in checked state therefore the switch wasn't invalidated. --- src/extra/themes/default/lv_theme_default.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extra/themes/default/lv_theme_default.c b/src/extra/themes/default/lv_theme_default.c index 056c8652bced..96416feda78f 100644 --- a/src/extra/themes/default/lv_theme_default.c +++ b/src/extra/themes/default/lv_theme_default.c @@ -772,7 +772,7 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj) lv_obj_add_style(obj, &styles->circle, 0); lv_obj_add_style(obj, &styles->disabled, LV_STATE_DISABLED); lv_obj_add_style(obj, &styles->outline_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_INDICATOR); + lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_INDICATOR | LV_STATE_CHECKED); lv_obj_add_style(obj, &styles->circle, LV_PART_INDICATOR); lv_obj_add_style(obj, &styles->disabled, LV_PART_INDICATOR | LV_STATE_DISABLED); lv_obj_add_style(obj, &styles->knob, LV_PART_KNOB);