mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
opt: optimize zoom animaiton break
This commit is contained in:
parent
70a945fbaa
commit
5e5c4d0316
1 changed files with 8 additions and 4 deletions
|
|
@ -407,15 +407,19 @@ void init_fadeout_layers(LayerSurface *l) {
|
|||
(l->animation_type_close &&
|
||||
strcmp(l->animation_type_close, "zoom") == 0)) {
|
||||
// 算出要设置的绝对坐标和大小
|
||||
fadeout_layer->current.width = (float)l->geom.width * zoom_end_ratio;
|
||||
fadeout_layer->current.height = (float)l->geom.height * zoom_end_ratio;
|
||||
fadeout_layer->current.width =
|
||||
(float)l->animation.current.width * zoom_end_ratio;
|
||||
fadeout_layer->current.height =
|
||||
(float)l->animation.current.height * zoom_end_ratio;
|
||||
fadeout_layer->current.x = usable_area.x + usable_area.width / 2 -
|
||||
fadeout_layer->current.width / 2;
|
||||
fadeout_layer->current.y = usable_area.y + usable_area.height / 2 -
|
||||
fadeout_layer->current.height / 2;
|
||||
// 算出偏差坐标,大小不用因为后续不使用他的大小偏差去设置,而是直接缩放buffer
|
||||
fadeout_layer->current.x = fadeout_layer->current.x - l->geom.x;
|
||||
fadeout_layer->current.y = fadeout_layer->current.y - l->geom.y;
|
||||
fadeout_layer->current.x =
|
||||
fadeout_layer->current.x - l->animation.current.x;
|
||||
fadeout_layer->current.y =
|
||||
fadeout_layer->current.y - l->animation.current.y;
|
||||
|
||||
} else if ((!l->animation_type_close &&
|
||||
strcmp(layer_animation_type_close, "slide") == 0) ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue