1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

minor fixes

This commit is contained in:
Gabor Kiss-Vamosi 2020-05-06 09:27:38 +02:00
parent 12919453d3
commit 8e87fc4620
4 changed files with 10 additions and 6 deletions

View File

@ -1309,6 +1309,8 @@ void lv_obj_refresh_style(lv_obj_t * obj, lv_style_property_t prop)
case LV_STYLE_SIZE: case LV_STYLE_SIZE:
case LV_STYLE_TRANSFORM_WIDTH: case LV_STYLE_TRANSFORM_WIDTH:
case LV_STYLE_TRANSFORM_HEIGHT: case LV_STYLE_TRANSFORM_HEIGHT:
case LV_STYLE_TRANSFORM_ANGLE:
case LV_STYLE_TRANSFORM_ZOOM:
case LV_STYLE_PAD_TOP: case LV_STYLE_PAD_TOP:
case LV_STYLE_PAD_BOTTOM: case LV_STYLE_PAD_BOTTOM:
case LV_STYLE_PAD_LEFT: case LV_STYLE_PAD_LEFT:

View File

@ -1369,19 +1369,19 @@ void lv_obj_fade_out(lv_obj_t * obj, uint32_t time, uint32_t delay);
/** /**
* Helps to quickly declare an event callback function. * Helps to quickly declare an event callback function.
* Will be expanded to: `void <name> (lv_obj_t * obj, lv_event_t e)` * Will be expanded to: `static void <name> (lv_obj_t * obj, lv_event_t e)`
* *
* Examples: * Examples:
* static LV_EVENT_CB_DECLARE(my_event1); //Protoype declaration * LV_EVENT_CB_DECLARE(my_event1); //Protoype declaration
* *
* static LV_EVENT_CB_DECLARE(my_event1) * LV_EVENT_CB_DECLARE(my_event1)
* { * {
* if(e == LV_EVENT_CLICKED) { * if(e == LV_EVENT_CLICKED) {
* lv_obj_set_hidden(obj ,true); * lv_obj_set_hidden(obj ,true);
* } * }
* } * }
*/ */
#define LV_EVENT_CB_DECLARE(name) void name(lv_obj_t * obj, lv_event_t e) #define LV_EVENT_CB_DECLARE(name) static void name(lv_obj_t * obj, lv_event_t e)
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */

View File

@ -112,7 +112,7 @@ void lv_anim_start(lv_anim_t * a)
/*Set the start value*/ /*Set the start value*/
if(new_anim->early_apply) { if(new_anim->early_apply) {
if(new_anim->exec_cb) new_anim->exec_cb(new_anim->var, new_anim->start); if(new_anim->exec_cb && new_anim->var) new_anim->exec_cb(new_anim->var, new_anim->start);
} }
/* Creating an animation changed the linked list. /* Creating an animation changed the linked list.

View File

@ -630,6 +630,8 @@ static lv_design_res_t lv_img_design(lv_obj_t * img, const lv_area_t * clip_area
img_dsc.zoom = lv_obj_get_style_transform_zoom(img, LV_IMG_PART_MAIN); img_dsc.zoom = lv_obj_get_style_transform_zoom(img, LV_IMG_PART_MAIN);
img_dsc.zoom = (img_dsc.zoom * ext->zoom) >> 8; img_dsc.zoom = (img_dsc.zoom * ext->zoom) >> 8;
if(img_dsc.zoom == 0) return LV_DESIGN_RES_OK;
img_dsc.angle = lv_obj_get_style_transform_angle(img, LV_IMG_PART_MAIN); img_dsc.angle = lv_obj_get_style_transform_angle(img, LV_IMG_PART_MAIN);
img_dsc.angle += ext->angle; img_dsc.angle += ext->angle;
@ -683,7 +685,7 @@ static lv_design_res_t lv_img_design(lv_obj_t * img, const lv_area_t * clip_area
} }
} }
return true; return LV_DESIGN_RES_OK;
} }
/** /**