mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
fix window animator center scale
This commit is contained in:
parent
5d3e9102cd
commit
2af0f475b5
@ -24,6 +24,9 @@
|
|||||||
static ret_t window_animator_center_scale_update_percent(window_animator_t* wa) {
|
static ret_t window_animator_center_scale_update_percent(window_animator_t* wa) {
|
||||||
if (wa->open) {
|
if (wa->open) {
|
||||||
wa->percent = 0.9f + 0.1f * wa->easing(wa->time_percent);
|
wa->percent = 0.9f + 0.1f * wa->easing(wa->time_percent);
|
||||||
|
if(wa->easing(wa->time_percent) == 0){
|
||||||
|
wa->percent = 0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
wa->percent = 1.0f - 0.1f * wa->easing(wa->time_percent);
|
wa->percent = 1.0f - 0.1f * wa->easing(wa->time_percent);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user