From cb800cb793aa9062ca980cbabc61dc59306912f9 Mon Sep 17 00:00:00 2001 From: lhdjply Date: Tue, 9 Jan 2024 11:05:59 +0800 Subject: [PATCH] chore(meter): remove #define LV_USE_METER (#5230) Signed-off-by: lhdjply --- .devcontainer/__lv_conf.h__ | 2 -- Kconfig | 3 --- env_support/cmsis-pack/lv_conf_cmsis.h | 2 -- lv_conf_template.h | 2 -- src/lv_conf_internal.h | 12 ----------- src/themes/default/lv_theme_default.c | 30 -------------------------- src/themes/mono/lv_theme_mono.c | 6 ------ src/themes/simple/lv_theme_simple.c | 6 ------ tests/src/lv_test_conf_minimal.h | 1 - 9 files changed, 64 deletions(-) diff --git a/.devcontainer/__lv_conf.h__ b/.devcontainer/__lv_conf.h__ index 1653f3e17..a2baa1cc3 100644 --- a/.devcontainer/__lv_conf.h__ +++ b/.devcontainer/__lv_conf.h__ @@ -475,8 +475,6 @@ #define LV_USE_MENU 1 -#define LV_USE_METER 1 - #define LV_USE_MSGBOX 1 #define LV_USE_ROLLER 1 /*Requires: lv_label*/ diff --git a/Kconfig b/Kconfig index 7a5f35cf2..b02f5db58 100644 --- a/Kconfig +++ b/Kconfig @@ -985,9 +985,6 @@ menu "LVGL configuration" config LV_USE_MENU bool "Menu." default y if !LV_CONF_MINIMAL - config LV_USE_METER - bool "Meter." - default y if !LV_CONF_MINIMAL config LV_USE_MSGBOX bool "Msgbox." default y if !LV_CONF_MINIMAL diff --git a/env_support/cmsis-pack/lv_conf_cmsis.h b/env_support/cmsis-pack/lv_conf_cmsis.h index 558ff2a96..329beaa31 100644 --- a/env_support/cmsis-pack/lv_conf_cmsis.h +++ b/env_support/cmsis-pack/lv_conf_cmsis.h @@ -480,8 +480,6 @@ #define LV_USE_MENU 1 -#define LV_USE_METER 1 - #define LV_USE_MSGBOX 1 #define LV_USE_ROLLER 1 /*Requires: lv_label*/ diff --git a/lv_conf_template.h b/lv_conf_template.h index 2361466fc..5ff963889 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -500,8 +500,6 @@ #define LV_USE_MENU 1 -#define LV_USE_METER 1 - #define LV_USE_MSGBOX 1 #define LV_USE_ROLLER 1 /*Requires: lv_label*/ diff --git a/src/lv_conf_internal.h b/src/lv_conf_internal.h index e46020d00..37f0e0896 100644 --- a/src/lv_conf_internal.h +++ b/src/lv_conf_internal.h @@ -1622,18 +1622,6 @@ #endif #endif -#ifndef LV_USE_METER - #ifdef _LV_KCONFIG_PRESENT - #ifdef CONFIG_LV_USE_METER - #define LV_USE_METER CONFIG_LV_USE_METER - #else - #define LV_USE_METER 0 - #endif - #else - #define LV_USE_METER 1 - #endif -#endif - #ifndef LV_USE_MSGBOX #ifdef _LV_KCONFIG_PRESENT #ifdef CONFIG_LV_USE_MSGBOX diff --git a/src/themes/default/lv_theme_default.c b/src/themes/default/lv_theme_default.c index 4a43932f7..5082bcab6 100644 --- a/src/themes/default/lv_theme_default.c +++ b/src/themes/default/lv_theme_default.c @@ -115,10 +115,6 @@ typedef struct { lv_style_t table_cell; #endif -#if LV_USE_METER - lv_style_t meter_marker, meter_indic; -#endif - #if LV_USE_TEXTAREA lv_style_t ta_cursor, ta_placeholder; #endif @@ -531,24 +527,6 @@ static void style_init(my_theme_t * theme) lv_style_set_pad_ver(&theme->styles.menu_separator, PAD_TINY); #endif -#if LV_USE_METER - style_init_reset(&theme->styles.meter_marker); - lv_style_set_line_width(&theme->styles.meter_marker, _LV_DPX_CALC(theme->disp_dpi, 5)); - lv_style_set_line_color(&theme->styles.meter_marker, theme->color_text); - - int32_t meter_size = _LV_DPX_CALC(theme->disp_dpi, 20); - lv_style_set_size(&theme->styles.meter_marker, meter_size, meter_size); - - meter_size = _LV_DPX_CALC(theme->disp_dpi, 15); - lv_style_set_pad_left(&theme->styles.meter_marker, meter_size); - - style_init_reset(&theme->styles.meter_indic); - lv_style_set_radius(&theme->styles.meter_indic, LV_RADIUS_CIRCLE); - lv_style_set_bg_color(&theme->styles.meter_indic, theme->color_text); - lv_style_set_bg_opa(&theme->styles.meter_indic, LV_OPA_COVER); - lv_style_set_size(&theme->styles.meter_indic, meter_size, meter_size); -#endif - #if LV_USE_TABLE style_init_reset(&theme->styles.table_cell); lv_style_set_border_width(&theme->styles.table_cell, _LV_DPX_CALC(theme->disp_dpi, 1)); @@ -1025,14 +1003,6 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj) } #endif - //#if LV_USE_METER - // else if(lv_obj_check_type(obj, &lv_meter_class)) { - // lv_obj_add_style(obj, &theme->styles.card, 0); - // lv_obj_add_style(obj, &theme->styles.circle, 0); - // lv_obj_add_style(obj, &theme->styles.meter_indic, LV_PART_INDICATOR); - // } - //#endif - #if LV_USE_TEXTAREA else if(lv_obj_check_type(obj, &lv_textarea_class)) { lv_obj_add_style(obj, &theme->styles.card, 0); diff --git a/src/themes/mono/lv_theme_mono.c b/src/themes/mono/lv_theme_mono.c index d5434f920..6ff54238d 100644 --- a/src/themes/mono/lv_theme_mono.c +++ b/src/themes/mono/lv_theme_mono.c @@ -433,12 +433,6 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj) } #endif - //#if LV_USE_METER - // else if(lv_obj_check_type(obj, &lv_meter_class)) { - // lv_obj_add_style(obj, &theme->styles.card, 0); - // } - //#endif - #if LV_USE_TEXTAREA else if(lv_obj_check_type(obj, &lv_textarea_class)) { lv_obj_add_style(obj, &theme->styles.card, 0); diff --git a/src/themes/simple/lv_theme_simple.c b/src/themes/simple/lv_theme_simple.c index 18077087b..235a25ad3 100644 --- a/src/themes/simple/lv_theme_simple.c +++ b/src/themes/simple/lv_theme_simple.c @@ -356,12 +356,6 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj) } #endif - //#if LV_USE_METER - // else if(lv_obj_check_type(obj, &lv_meter_class)) { - // lv_obj_add_style(obj, &theme->styles.light, 0); - // } - //#endif - #if LV_USE_TEXTAREA else if(lv_obj_check_type(obj, &lv_textarea_class)) { lv_obj_add_style(obj, &theme->styles.white, 0); diff --git a/tests/src/lv_test_conf_minimal.h b/tests/src/lv_test_conf_minimal.h index 5896c5ba3..afc24470d 100644 --- a/tests/src/lv_test_conf_minimal.h +++ b/tests/src/lv_test_conf_minimal.h @@ -1,5 +1,4 @@ #define LV_MEM_SIZE 65535 -#define LV_USE_METER 0 #define LV_USE_LOG 1 #define LV_USE_ASSERT_NULL 0 #define LV_USE_ASSERT_MALLOC 0