mirror of
https://github.com/lvgl/lvgl.git
synced 2024-11-23 09:43:41 +08:00
fix(obj_style): transform_scale_(xy)_safe return LV_SCALE_NONE instead of 1
This commit is contained in:
parent
4a77a05fb3
commit
356aecdb92
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user