diff --git a/lv_conf_template.h b/lv_conf_template.h index 229bb82fa..fe9cb1470 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -612,7 +612,7 @@ typedef void * lv_obj_user_data_t; #endif /*Mask (dependencies: -)*/ -#define LV_USE_OBJMASK 0 +#define LV_USE_OBJMASK 1 /*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/ #define LV_USE_MSGBOX 1 diff --git a/src/lv_conf_internal.h b/src/lv_conf_internal.h index e9a023e8a..c684676a3 100644 --- a/src/lv_conf_internal.h +++ b/src/lv_conf_internal.h @@ -925,7 +925,7 @@ /*Mask (dependencies: -)*/ #ifndef LV_USE_OBJMASK -#define LV_USE_OBJMASK 0 +#define LV_USE_OBJMASK 1 #endif /*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/ diff --git a/src/lv_themes/lv_theme_empty.c b/src/lv_themes/lv_theme_empty.c index 044a784a9..a74e9a72d 100644 --- a/src/lv_themes/lv_theme_empty.c +++ b/src/lv_themes/lv_theme_empty.c @@ -24,7 +24,7 @@ /********************** * STATIC PROTOTYPES **********************/ -static void lv_theme_empty_apply(lv_obj_t * obj, lv_theme_style_t name); +static void theme_apply(lv_obj_t * obj, lv_theme_style_t name); /********************** @@ -63,12 +63,12 @@ lv_theme_t * lv_theme_empty_init(lv_color_t color_primary, lv_color_t color_seco lv_style_init(&opa_cover); lv_style_set_bg_opa(&opa_cover, LV_STATE_DEFAULT, LV_OPA_COVER); - theme.apply_xcb = lv_theme_empty_apply; + theme.apply_xcb = theme_apply; return &theme; } -void lv_theme_empty_apply(lv_obj_t * obj, lv_theme_style_t name) +void theme_apply(lv_obj_t * obj, lv_theme_style_t name) { if(name == LV_THEME_SCR) { lv_obj_clean_style_list(obj, LV_OBJ_PART_MAIN); diff --git a/src/lv_themes/lv_theme_material.c b/src/lv_themes/lv_theme_material.c index 399f3295a..3ba91aaba 100644 --- a/src/lv_themes/lv_theme_material.c +++ b/src/lv_themes/lv_theme_material.c @@ -73,7 +73,7 @@ /********************** * STATIC PROTOTYPES **********************/ -static void lv_theme_material_apply(lv_obj_t * obj, lv_theme_style_t name); +static void theme_apply(lv_obj_t * obj, lv_theme_style_t name); static void style_init_reset(lv_style_t * style); /********************** @@ -895,7 +895,7 @@ lv_theme_t * lv_theme_material_init(lv_color_t color_primary, lv_color_t color_s table_init(); win_init(); - theme.apply_xcb = lv_theme_material_apply; + theme.apply_xcb = theme_apply; inited = true; @@ -905,7 +905,7 @@ lv_theme_t * lv_theme_material_init(lv_color_t color_primary, lv_color_t color_s } -void lv_theme_material_apply(lv_obj_t * obj, lv_theme_style_t name) +static void theme_apply(lv_obj_t * obj, lv_theme_style_t name) { lv_style_list_t * list; diff --git a/src/lv_themes/lv_theme_mono.c b/src/lv_themes/lv_theme_mono.c index ff90ac08f..b869b8387 100644 --- a/src/lv_themes/lv_theme_mono.c +++ b/src/lv_themes/lv_theme_mono.c @@ -24,7 +24,7 @@ /********************** * STATIC PROTOTYPES **********************/ -static void lv_theme_mono_apply(lv_obj_t * obj, lv_theme_style_t name); +static void theme_apply(lv_obj_t * obj, lv_theme_style_t name); /********************** * STATIC VARIABLES @@ -529,13 +529,13 @@ lv_theme_t * lv_theme_mono_init(lv_color_t color_primary, lv_color_t color_secon table_init(); win_init(); - theme.apply_xcb = lv_theme_mono_apply; + theme.apply_xcb = theme_apply; return &theme; } -void lv_theme_mono_apply(lv_obj_t * obj, lv_theme_style_t name) +static void theme_apply(lv_obj_t * obj, lv_theme_style_t name) { lv_style_list_t * list; diff --git a/src/lv_themes/lv_themes.mk b/src/lv_themes/lv_themes.mk index daf690943..d7eb883bf 100644 --- a/src/lv_themes/lv_themes.mk +++ b/src/lv_themes/lv_themes.mk @@ -1,5 +1,8 @@ CSRCS += lv_theme.c CSRCS += lv_theme_material.c +CSRCS += lv_theme_mono.c +CSRCS += lv_theme_empty.c +CSRCS += lv_theme_template.c DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_themes VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_themes diff --git a/src/lv_widgets/lv_page.c b/src/lv_widgets/lv_page.c index 7aa0a00e6..f2208898e 100644 --- a/src/lv_widgets/lv_page.c +++ b/src/lv_widgets/lv_page.c @@ -992,7 +992,6 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi lv_obj_set_drag_parent(scroller_page, false); lv_obj_set_drag_parent(lv_page_get_scrl(scroller_page), false); - lv_page_ext_t * scroller_page_ext = lv_obj_get_ext_attr(scroller_page); /*Hide scrollbars if required*/ if(scroller_page_ext->scrlbar.mode == LV_SCRLBAR_MODE_DRAG) { scroller_page_ext->scrlbar.hor_draw = 0; diff --git a/tests/Makefile b/tests/Makefile index 70d660987..3564acaeb 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -5,7 +5,15 @@ CC ?= gcc LVGL_DIR ?= ${shell pwd}/../.. LVGL_DIR_NAME ?= lvgl -WARNINGS ?= -Werror -Wall -Wextra -Wshadow -Wundef -Wmaybe-uninitialized -Wmissing-prototypes -Wno-discarded-qualifiers -Wall -Wextra -Wno-unused-function -Wundef -Wno-error=strict-prototypes -Wpointer-arith -fno-strict-aliasing -Wno-error=cpp -Wuninitialized -Wmaybe-uninitialized -Wno-unused-parameter -Wno-missing-field-initializers -Wtype-limits -Wsizeof-pointer-memaccess -Wno-format-nonliteral -Wno-cast-qual -Wunreachable-code -Wno-switch-default -Wno-switch-enum -Wreturn-type -Wmultichar -Wformat-security -Wno-ignored-qualifiers -Wno-error=pedantic -Wno-sign-compare -Wno-error=missing-prototypes -Wdouble-promotion -Wclobbered -Wdeprecated -Wempty-body -Wtype-limits -Wshift-negative-value -Wstack-usage=2048 -Wno-unused-value -Wno-unused-parameter -Wno-missing-field-initializers -Wuninitialized -Wmaybe-uninitialized -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wtype-limits -Wsizeof-pointer-memaccess -Wno-format-nonliteral -Wpointer-arith -Wno-cast-qual -Wmissing-prototypes -Wunreachable-code -Wno-switch-default -Wswitch-enum -Wreturn-type -Wmultichar -Wno-discarded-qualifiers -Wformat-security -Wno-ignored-qualifiers -Wno-sign-compare +WARNINGS ?= -Werror -Wall -Wextra \ + -Wshadow -Wundef -Wmaybe-uninitialized -Wmissing-prototypes -Wno-discarded-qualifiers \ + -Wno-unused-function -Wno-error=strict-prototypes -Wpointer-arith -fno-strict-aliasing -Wno-error=cpp -Wuninitialized \ + -Wno-unused-parameter -Wno-missing-field-initializers -Wno-format-nonliteral -Wno-cast-qual -Wunreachable-code -Wno-switch-default \ + -Wreturn-type -Wmultichar -Wformat-security -Wno-ignored-qualifiers -Wno-error=pedantic -Wno-sign-compare -Wno-error=missing-prototypes -Wdouble-promotion -Wclobbered -Wdeprecated \ + -Wempty-body -Wshift-negative-value -Wstack-usage=2048 \ + -Wtype-limits -Wsizeof-pointer-memaccess -Wpointer-arith + +#-Wno-unused-value -Wno-unused-parameter OPTIMIZATION ?= -O3 -g0 diff --git a/tests/build.py b/tests/build.py index 6cba852eb..d32ddde0a 100755 --- a/tests/build.py +++ b/tests/build.py @@ -65,11 +65,14 @@ minimal_monochrome = { "LV_USE_USER_DATA":0, "LV_USE_USER_DATA_FREE":0, "LV_USE_LOG":0, - "LV_USE_THEME_EMPTY":1, - "LV_THEME_DEFAULT_INIT": "\\\"lv_theme_material_init\\\"", + "LV_USE_THEME_EMPTY":0, + "LV_USE_THEME_MATERIAL":0, + "LV_USE_THEME_MONO":1, + "LV_USE_THEME_TEMPLATE":0, + "LV_THEME_DEFAULT_INIT": "\\\"lv_theme_mono_init\\\"", "LV_THEME_DEFAULT_COLOR_PRIMARY": "\\\"LV_COLOR_RED\\\"", "LV_THEME_DEFAULT_COLOR_SECONDARY": "\\\"LV_COLOR_BLUE\\\"", - "LV_THEME_DEFAULT_FLAGS" : "\\\"LV_THEME_MATERIAL_FLAG_NONE\\\"", + "LV_THEME_DEFAULT_FLAG" : "0", "LV_THEME_DEFAULT_FONT_SMALL" : "\\\"&lv_font_unscii_8\\\"", "LV_THEME_DEFAULT_FONT_NORMAL" : "\\\"&lv_font_unscii_8\\\"", "LV_THEME_DEFAULT_FONT_SUBTITLE" : "\\\"&lv_font_unscii_8\\\"", @@ -143,7 +146,7 @@ all_obj_minimal_features = { "LV_THEME_DEFAULT_INIT": "\\\"lv_theme_material_init\\\"", "LV_THEME_DEFAULT_COLOR_PRIMARY": "\\\"LV_COLOR_RED\\\"", "LV_THEME_DEFAULT_COLOR_SECONDARY": "\\\"LV_COLOR_BLUE\\\"", - "LV_THEME_DEFAULT_FLAGS" : "\\\"LV_THEME_MATERIAL_FLAG_NONE\\\"", + "LV_THEME_DEFAULT_FLAG" : "\\\"LV_THEME_MATERIAL_FLAG_LIGHT\\\"", "LV_THEME_DEFAULT_FONT_SMALL" : "\\\"&lv_font_montserrat_16\\\"", "LV_THEME_DEFAULT_FONT_NORMAL" : "\\\"&lv_font_montserrat_16\\\"", "LV_THEME_DEFAULT_FONT_SUBTITLE" : "\\\"&lv_font_montserrat_16\\\"", @@ -221,7 +224,7 @@ all_obj_all_features = { "LV_THEME_DEFAULT_INIT": "\\\"lv_theme_material_init\\\"", "LV_THEME_DEFAULT_COLOR_PRIMARY": "\\\"LV_COLOR_RED\\\"", "LV_THEME_DEFAULT_COLOR_SECONDARY": "\\\"LV_COLOR_BLUE\\\"", - "LV_THEME_DEFAULT_FLAGS" : "\\\"LV_THEME_MATERIAL_FLAG_NONE\\\"", + "LV_THEME_DEFAULT_FLAG" : "\\\"LV_THEME_MATERIAL_FLAG_LIGHT\\\"", "LV_THEME_DEFAULT_FONT_SMALL" : "\\\"&lv_font_montserrat_12\\\"", "LV_THEME_DEFAULT_FONT_NORMAL" : "\\\"&lv_font_montserrat_16\\\"", "LV_THEME_DEFAULT_FONT_SUBTITLE" : "\\\"&lv_font_montserrat_22\\\"", @@ -302,7 +305,7 @@ advanced_features = { "LV_THEME_DEFAULT_INIT": "\\\"lv_theme_material_init\\\"", "LV_THEME_DEFAULT_COLOR_PRIMARY": "\\\"LV_COLOR_RED\\\"", "LV_THEME_DEFAULT_COLOR_SECONDARY": "\\\"LV_COLOR_BLUE\\\"", - "LV_THEME_DEFAULT_FLAGS" : "\\\"LV_THEME_MATERIAL_FLAG_NONE\\\"", + "LV_THEME_DEFAULT_FLAG" : "\\\"LV_THEME_MATERIAL_FLAG_LIGHT\\\"", "LV_THEME_DEFAULT_FONT_SMALL" : "\\\"&lv_font_montserrat_12\\\"", "LV_THEME_DEFAULT_FONT_NORMAL" : "\\\"&lv_font_montserrat_16\\\"", "LV_THEME_DEFAULT_FONT_SUBTITLE" : "\\\"&lv_font_montserrat_22\\\"",