fix(style) use an other technique to generate style set functions

The previous version caused glitches.
This commit is contained in:
Gabor Kiss-Vamosi
2021-05-31 14:45:53 +02:00
parent 165ff859f3
commit ab149501c8
2 changed files with 360 additions and 180 deletions

View File

@@ -390,8 +390,10 @@ def style_set(p):
cast = style_set_cast(p['style_type'])
print("static inline void lv_style_set_" + p['name'].lower() +"(lv_style_t * style, "+ p['var_type'] +" value)")
print("{")
print(" lv_style_value_t * v = (lv_style_value_t*)&value;")
print(" lv_style_set_prop(style, LV_STYLE_" + p['name'] +", *v);")
print(" lv_style_value_t v = {0};")
print(" " + p['var_type'] +" * v2 = ("+ p['var_type'] +" *) &v;")
print(" *v2 = value;")
print(" lv_style_set_prop(style, LV_STYLE_" + p['name'] +", v);")
print("}")
print("")

File diff suppressed because it is too large Load Diff