From ecb5637d9db86a68b7346d9bf98be86846381183 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 11 May 2020 10:28:18 +0200 Subject: [PATCH] improve mono theme --- src/lv_themes/lv_theme_mono.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lv_themes/lv_theme_mono.c b/src/lv_themes/lv_theme_mono.c index bada62ef4..9c1ee9cb4 100644 --- a/src/lv_themes/lv_theme_mono.c +++ b/src/lv_themes/lv_theme_mono.c @@ -30,6 +30,7 @@ static lv_theme_t theme; static lv_style_t style_scr; static lv_style_t style_bg; +static lv_style_t style_clip_corner; static lv_style_t style_btn; static lv_style_t style_round; static lv_style_t style_no_radius; @@ -123,6 +124,10 @@ static void basic_init(void) lv_style_set_pad_bottom(&style_bg, LV_STATE_DEFAULT, LV_DPI / 10); lv_style_set_pad_inner(&style_bg, LV_STATE_DEFAULT, LV_DPI / 10); + lv_style_init(&style_clip_corner); + lv_style_set_clip_corner(&style_clip_corner, LV_STATE_DEFAULT, true); + + lv_style_init(&style_btn); lv_style_set_radius(&style_btn, LV_STATE_DEFAULT, RADIUS); lv_style_set_border_width(&style_btn, LV_STATE_DEFAULT, BORDER_WIDTH); @@ -846,6 +851,7 @@ static void theme_apply(lv_obj_t * obj, lv_theme_style_t name) list = lv_obj_get_style_list(obj, LV_LIST_PART_BG); lv_style_list_add_style(list, &style_bg); lv_style_list_add_style(list, &style_pad_none); + lv_style_list_add_style(list, &style_clip_corner); lv_obj_clean_style_list(obj, LV_LIST_PART_SCROLLABLE);