fix: fix area invalidation issue with style_transform_zoom/ange

This commit is contained in:
Gabor Kiss-Vamosi
2022-07-24 16:17:08 +02:00
parent 689e584d52
commit 7823db1ded
2 changed files with 11 additions and 3 deletions
+10 -2
View File
@@ -933,11 +933,19 @@ static void lv_obj_set_state(lv_obj_t * obj, lv_state_t new_state)
LV_ASSERT_OBJ(obj, MY_CLASS);
lv_state_t prev_state = obj->state;
obj->state = new_state;
_lv_style_state_cmp_t cmp_res = _lv_obj_style_state_compare(obj, prev_state, new_state);
/*If there is no difference in styles there is nothing else to do*/
if(cmp_res == _LV_STYLE_STATE_CMP_SAME) return;
if(cmp_res == _LV_STYLE_STATE_CMP_SAME) {
obj->state = new_state;
return;
}
/*Invalidate the object in their current state*/
lv_obj_invalidate(obj);
obj->state = new_state;
_lv_obj_style_transition_dsc_t * ts = lv_malloc(sizeof(_lv_obj_style_transition_dsc_t) * STYLE_TRANSITION_MAX);
lv_memzero(ts, sizeof(_lv_obj_style_transition_dsc_t) * STYLE_TRANSITION_MAX);
+1 -1
View File
@@ -799,7 +799,7 @@ void lv_obj_transform_point(const lv_obj_t * obj, lv_point_t * p, bool recursive
{
if(obj) {
lv_layer_type_t layer_type = _lv_obj_get_layer_type(obj);
bool do_tranf = layer_type == LV_LAYER_TYPE_TRANSFORM;
bool do_tranf = layer_type == LV_LAYER_TYPE_TRANSFORM ? true : false;
if(inv) {
if(recursive) lv_obj_transform_point(lv_obj_get_parent(obj), p, recursive, inv);
if(do_tranf) transform_point(obj, p, inv);