From 493ace352fea0eaa37abccaa0938c0c4a12a995a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 18 Aug 2021 14:08:54 +0200 Subject: [PATCH] fix(win) enable clip_corner and border_post by default fixes #2430 --- src/core/lv_obj.c | 1 - src/extra/themes/default/lv_theme_default.c | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/core/lv_obj.c b/src/core/lv_obj.c index 738f2984c..ab48be0f9 100644 --- a/src/core/lv_obj.c +++ b/src/core/lv_obj.c @@ -502,7 +502,6 @@ static void lv_obj_draw(lv_event_t * e) coords.y1 -= h; coords.y2 += h; - lv_obj_draw_part_dsc_t part_dsc; lv_obj_draw_dsc_init(&part_dsc, clip_area); part_dsc.class_p = MY_CLASS; diff --git a/src/extra/themes/default/lv_theme_default.c b/src/extra/themes/default/lv_theme_default.c index d97a94848..8f53f78f8 100644 --- a/src/extra/themes/default/lv_theme_default.c +++ b/src/extra/themes/default/lv_theme_default.c @@ -300,6 +300,7 @@ static void style_init(void) style_init_reset(&styles->clip_corner); lv_style_set_clip_corner(&styles->clip_corner, true); + lv_style_set_border_post(&styles->clip_corner, true); style_init_reset(&styles->pad_normal); lv_style_set_pad_all(&styles->pad_normal, PAD_DEF); @@ -974,10 +975,15 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj) #endif #if LV_USE_TABVIEW - if(lv_obj_check_type(obj, &lv_tabview_class)) { + else if(lv_obj_check_type(obj, &lv_tabview_class)) { lv_obj_add_style(obj, &styles->scr, 0); lv_obj_add_style(obj, &styles->pad_zero, 0); - return; + } +#endif + +#if LV_USE_WIN + else if(lv_obj_check_type(obj, &lv_win_class)) { + lv_obj_add_style(obj, &styles->clip_corner, 0); } #endif