mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-24 16:37:18 +08:00
fix: fix area invalidation issue with style_transform_zoom/ange
This commit is contained in:
+10
-2
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user