1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

fix(style): _lv_style_prop_lookup_flags tell all flags for LV_STYLE_PROP_ANY

This commit is contained in:
Gabor Kiss-Vamosi 2022-03-23 11:25:29 +01:00
parent a8e99798b3
commit e53f60259c
2 changed files with 4 additions and 2 deletions

View File

@ -422,8 +422,9 @@ uint8_t _lv_style_prop_lookup_flags(lv_style_prop_t prop)
{
extern const uint8_t _lv_style_builtin_prop_flag_lookup_table[];
extern uint32_t _lv_style_custom_prop_flag_lookup_table_size;
if(prop == LV_STYLE_PROP_ANY || prop == LV_STYLE_PROP_INV)
return 0;
if(prop == LV_STYLE_PROP_ANY) return LV_STYLE_PROP_ALL; /*Any prop can have any flags*/
if(prop == LV_STYLE_PROP_INV) return 0;
if(prop < _LV_STYLE_NUM_BUILT_IN_PROPS)
return _lv_style_builtin_prop_flag_lookup_table[prop];
prop -= _LV_STYLE_NUM_BUILT_IN_PROPS;

View File

@ -40,6 +40,7 @@ extern "C" {
#define LV_STYLE_PROP_EXT_DRAW (1 << 1) /*Requires ext. draw size update when changed*/
#define LV_STYLE_PROP_LAYOUT_REFR (1 << 2) /*Requires layout update when changed*/
#define LV_STYLE_PROP_PARENT_LAYOUT_REFR (1 << 3) /*Requires layout update on parent when changed*/
#define LV_STYLE_PROP_ALL (0xf) /*Indicating all flags*/
/**
* Other constants