feat: add option zoom_end_ratio

This commit is contained in:
DreamMaoMao 2025-07-12 14:54:37 +08:00
parent 4f44d3dd06
commit d1cff55348
5 changed files with 15 additions and 10 deletions

View file

@ -788,16 +788,16 @@ void init_fadeout_client(Client *c) {
} else {
fadeout_cient->current.y =
(fadeout_cient->geom.height -
fadeout_cient->geom.height * zoom_initial_ratio) /
fadeout_cient->geom.height * zoom_end_ratio) /
2;
fadeout_cient->current.x =
(fadeout_cient->geom.width -
fadeout_cient->geom.width * zoom_initial_ratio) /
fadeout_cient->geom.width * zoom_end_ratio) /
2;
fadeout_cient->current.width =
fadeout_cient->geom.width * zoom_initial_ratio;
fadeout_cient->geom.width * zoom_end_ratio;
fadeout_cient->current.height =
fadeout_cient->geom.height * zoom_initial_ratio;
fadeout_cient->geom.height * zoom_end_ratio;
}
fadeout_cient->animation.passed_frames = 0;

View file

@ -408,10 +408,8 @@ void init_fadeout_layers(LayerSurface *l) {
strcmp(layer_animation_type_close, "zoom") == 0) ||
(l->animation_type_close &&
strcmp(l->animation_type_close, "zoom") == 0)) {
fadeout_layer->current.width =
(float)l->geom.width * zoom_initial_ratio;
fadeout_layer->current.height =
(float)l->geom.height * zoom_initial_ratio;
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.x = usable_area.x + usable_area.width / 2 -
fadeout_layer->current.width / 2;
fadeout_layer->current.y = usable_area.y + usable_area.height / 2 -