diff --git a/docs/src/details/common-widget-features/styles/style-properties.rst b/docs/src/details/common-widget-features/styles/style-properties.rst
index 367efeda8f..212d4db05f 100644
--- a/docs/src/details/common-widget-features/styles/style-properties.rst
+++ b/docs/src/details/common-widget-features/styles/style-properties.rst
@@ -1357,6 +1357,34 @@ color_filter_opa
The intensity of mixing of color filter.
+.. raw:: html
+
+
+ - Default `LV_OPA_TRANSP`
+ - Inherited No
+ - Layout No
+ - Ext. draw No
+
+
+recolor
+~~~~~~~
+
+Set a color to mix to the obj.
+
+.. raw:: html
+
+
+ - Default `0x000000`
+ - Inherited No
+ - Layout No
+ - Ext. draw No
+
+
+recolor_opa
+~~~~~~~~~~~
+
+Sets the intensity of color mixing. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent. A value of 255, `LV_OPA_100` or `LV_OPA_COVER` means fully opaque. Intermediate values like LV_OPA_10, LV_OPA_20, etc result in semi-transparency.
+
.. raw:: html
@@ -1622,7 +1650,7 @@ Set column in which Widget should be placed.
.. raw:: html
- - Default `LV_GRID_ALIGN_START`
+ - Default 0
- Inherited No
- Layout Yes
- Ext. draw No
@@ -1650,7 +1678,7 @@ Set how many columns Widget should span. Needs to be >= 1.
.. raw:: html
- - Default `LV_GRID_ALIGN_START`
+ - Default 1
- Inherited No
- Layout Yes
- Ext. draw No
@@ -1664,7 +1692,7 @@ Set row in which Widget should be placed.
.. raw:: html
- - Default `LV_GRID_ALIGN_START`
+ - Default 0
- Inherited No
- Layout Yes
- Ext. draw No
@@ -1692,7 +1720,7 @@ Set how many rows Widget should span. Needs to be >= 1.
.. raw:: html
- - Default `LV_GRID_ALIGN_START`
+ - Default 1
- Inherited No
- Layout Yes
- Ext. draw No
diff --git a/scripts/style_api_gen.py b/scripts/style_api_gen.py
index 21acadcaf8..9bd23bd9fb 100755
--- a/scripts/style_api_gen.py
+++ b/scripts/style_api_gen.py
@@ -395,7 +395,7 @@ props = [
{'name': 'RECOLOR_OPA',
'style_type': 'num', 'var_type': 'lv_opa_t', 'default':'`LV_OPA_TRANSP`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
- 'dsc': "Set intensity of color mixing. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 255, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency."},
+ 'dsc': "Sets the intensity of color mixing. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent. A value of 255, `LV_OPA_100` or `LV_OPA_COVER` means fully opaque. Intermediate values like LV_OPA_10, LV_OPA_20, etc result in semi-transparency."},
{'name': 'ANIM',
'style_type': 'ptr', 'var_type': 'const lv_anim_t *', 'default':'`NULL`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
@@ -478,7 +478,7 @@ props = [
'dsc': "Defines how to distribute the rows."},
{'name': 'GRID_CELL_COLUMN_POS',
- 'style_type': 'num', 'var_type': 'int32_t', 'default':'`LV_GRID_ALIGN_START`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
+ 'style_type': 'num', 'var_type': 'int32_t', 'default':0, 'inherited': 0, 'layout': 1, 'ext_draw': 0,
'dsc': "Set column in which Widget should be placed."},
{'name': 'GRID_CELL_X_ALIGN',
@@ -486,11 +486,11 @@ props = [
'dsc': "Set how to align Widget horizontally."},
{'name': 'GRID_CELL_COLUMN_SPAN',
- 'style_type': 'num', 'var_type': 'int32_t', 'default':'`LV_GRID_ALIGN_START`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
+ 'style_type': 'num', 'var_type': 'int32_t', 'default':1, 'inherited': 0, 'layout': 1, 'ext_draw': 0,
'dsc': "Set how many columns Widget should span. Needs to be >= 1."},
{'name': 'GRID_CELL_ROW_POS',
- 'style_type': 'num', 'var_type': 'int32_t', 'default':'`LV_GRID_ALIGN_START`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
+ 'style_type': 'num', 'var_type': 'int32_t', 'default':0, 'inherited': 0, 'layout': 1, 'ext_draw': 0,
'dsc': "Set row in which Widget should be placed."},
{'name': 'GRID_CELL_Y_ALIGN',
@@ -498,7 +498,7 @@ props = [
'dsc': "Set how to align Widget vertically."},
{'name': 'GRID_CELL_ROW_SPAN',
- 'style_type': 'num', 'var_type': 'int32_t', 'default':'`LV_GRID_ALIGN_START`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
+ 'style_type': 'num', 'var_type': 'int32_t', 'default':1, 'inherited': 0, 'layout': 1, 'ext_draw': 0,
'dsc': "Set how many rows Widget should span. Needs to be >= 1."},
]
@@ -747,7 +747,7 @@ print('''\
''')
print('#endif /* LV_STYLE_GEN_H */')
-sys.stdout = open(base_dir + '/../docs/details/base-widget/styles/style-properties.rst', 'w')
+sys.stdout = open(base_dir + '/../docs/src/details/common-widget-features/styles/style-properties.rst', 'w')
print('.. _style_properties:')
print()
diff --git a/src/misc/lv_style.c b/src/misc/lv_style.c
index d7c2122520..fe18c3272c 100644
--- a/src/misc/lv_style.c
+++ b/src/misc/lv_style.c
@@ -474,6 +474,15 @@ lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop)
return (lv_style_value_t) {
.num = 256
};
+
+#if LV_USE_GRID
+ case LV_STYLE_GRID_CELL_ROW_SPAN:
+ case LV_STYLE_GRID_CELL_COLUMN_SPAN:
+ return (lv_style_value_t) {
+ .num = 1
+ };
+#endif
+
default:
return (lv_style_value_t) {
.ptr = NULL
diff --git a/src/others/xml/lv_xml_style.c b/src/others/xml/lv_xml_style.c
index 6d987191ff..dc3af15a1d 100644
--- a/src/others/xml/lv_xml_style.c
+++ b/src/others/xml/lv_xml_style.c
@@ -283,8 +283,8 @@ lv_result_t lv_xml_style_register(lv_xml_component_scope_t * scope, const char *
else SET_STYLE_IF(grid_cell_row_pos, lv_xml_atoi(value));
else SET_STYLE_IF(grid_cell_row_span, lv_xml_atoi(value));
else SET_STYLE_IF(grid_cell_y_align, lv_xml_grid_align_to_enum(value));
- else if(lv_streq(name, "style_grid_column_dsc_array") ||
- lv_streq(name, "style_grid_row_dsc_array")) {
+ else if(lv_streq(name, "grid_column_dsc_array") ||
+ lv_streq(name, "grid_row_dsc_array")) {
uint32_t item_cnt = 0;
uint32_t c;
@@ -312,7 +312,7 @@ lv_result_t lv_xml_style_register(lv_xml_component_scope_t * scope, const char *
}
dsc_array[item_cnt] = LV_GRID_TEMPLATE_LAST;
- if(lv_streq(name, "style_grid_column_dsc_array")) {
+ if(lv_streq(name, "grid_column_dsc_array")) {
lv_style_set_grid_column_dsc_array(style, dsc_array);
}
else {