From 1fa77fa5d7bf2be7eacdbe6452734358639b782a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 22 Jul 2018 22:34:28 +0200 Subject: [PATCH] lv_obj: apply theme on non-screen base objects too --- lv_core/lv_obj.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index 6c791a6eb..037dbca65 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -182,7 +182,12 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy) new_obj->ext_size = 0; /*Set appearance*/ - new_obj->style_p = &lv_style_plain_color; + lv_theme_t * th = lv_theme_get_current(); + if(th) { + new_obj->style_p = th->panel; + } else { + new_obj->style_p = &lv_style_plain_color; + } /*Set virtual functions*/ lv_obj_set_signal_func(new_obj, lv_obj_signal);