fix(obj_style): transform_scale_(xy)_safe return LV_SCALE_NONE instead of 1

This commit is contained in:
Paul Vogel 2024-11-20 11:26:57 -06:00
parent 4a77a05fb3
commit 356aecdb92

View File

@ -290,13 +290,13 @@ lv_text_align_t lv_obj_calculate_style_text_align(const lv_obj_t * obj, lv_part_
static inline int32_t lv_obj_get_style_transform_scale_x_safe(const lv_obj_t * obj, lv_part_t part)
{
int32_t scale = lv_obj_get_style_transform_scale_x(obj, part);
return scale > 0 ? scale : 1;
return scale > 0 ? scale : LV_SCALE_NONE;
}
static inline int32_t lv_obj_get_style_transform_scale_y_safe(const lv_obj_t * obj, lv_part_t part)
{
int32_t scale = lv_obj_get_style_transform_scale_y(obj, part);
return scale > 0 ? scale : 1;
return scale > 0 ? scale : LV_SCALE_NONE;
}
/**