mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
minor fixes
This commit is contained in:
parent
6cfcc3fa55
commit
d80cc562d4
@ -304,7 +304,7 @@ bool lv_bar_get_sym(lv_obj_t * bar)
|
||||
* @param bar pointer to a bar object
|
||||
* @return the animation time in milliseconds.
|
||||
*/
|
||||
uint16_t lv_bar_get_anim_time(lv_obj_t * bar, uint16_t anim_time)
|
||||
uint16_t lv_bar_get_anim_time(lv_obj_t * bar)
|
||||
{
|
||||
#if LV_USE_ANIMATION
|
||||
lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar);
|
||||
|
@ -155,7 +155,7 @@ bool lv_bar_get_sym(lv_obj_t * bar);
|
||||
* @param bar pointer to a bar object
|
||||
* @return the animation time in milliseconds.
|
||||
*/
|
||||
uint16_t lv_bar_get_anim_time(lv_obj_t * bar, uint16_t anim_time);
|
||||
uint16_t lv_bar_get_anim_time(lv_obj_t * bar);
|
||||
|
||||
/**
|
||||
* Get a style of a bar
|
||||
|
@ -598,6 +598,7 @@ void lv_canvas_draw_img(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, const voi
|
||||
|
||||
lv_draw_img(&coords, &mask, src, style, LV_OPA_COVER);
|
||||
|
||||
lv_refr_set_disp_refreshing(refr_ori);
|
||||
}
|
||||
|
||||
|
||||
|
@ -530,7 +530,7 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, lv_anim_enable_t anim_
|
||||
scrlable_x += page_w - obj_w;
|
||||
}
|
||||
|
||||
if(ext->anim_time == 0) {
|
||||
if(anim_en == LV_ANIM_ON && lv_page_get_anim_time(page) != 0) {
|
||||
lv_obj_set_y(ext->scrl, scrlable_y);
|
||||
lv_obj_set_x(ext->scrl, scrlable_x);
|
||||
} else {
|
||||
@ -539,7 +539,7 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, lv_anim_enable_t anim_
|
||||
a.act_time = 0;
|
||||
a.start = lv_obj_get_y(ext->scrl);
|
||||
a.end = scrlable_y;
|
||||
a.time = ext->anim_time;
|
||||
a.time = lv_page_get_anim_time(page);
|
||||
a.ready_cb = NULL;
|
||||
a.playback = 0;
|
||||
a.repeat = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user