@@ -1079,59 +1079,50 @@ namespace Gala {
10791079 return ;
10801080 }
10811081
1082- var duration = AnimationDuration . HIDE ;
1083-
10841082 kill_window_effects (actor);
10851083 minimizing. add (actor);
10861084
1087- int width, height;
1088- get_display (). get_size (out width, out height);
1089-
10901085 Mtk . Rectangle icon = {};
10911086 if (actor. get_meta_window (). get_icon_geometry (out icon)) {
10921087 // Fix icon position and size according to ui scaling factor.
1093- float ui_scale = get_display (). get_monitor_scale (get_display (). get_monitor_index_for_rect (icon));
1088+ var ui_scale = get_display (). get_monitor_scale (get_display (). get_monitor_index_for_rect (icon));
10941089 icon. x = Utils . scale_to_int (icon. x, ui_scale);
10951090 icon. y = Utils . scale_to_int (icon. y, ui_scale);
10961091 icon. width = Utils . scale_to_int (icon. width, ui_scale);
10971092 icon. height = Utils . scale_to_int (icon. height, ui_scale);
10981093
1099- float scale_x = (float )icon. width / actor. width;
1100- float scale_y = (float )icon. height / actor. height;
1101- float anchor_x = (float )(actor. x - icon. x) / (icon. width - actor. width);
1102- float anchor_y = (float )(actor. y - icon. y) / (icon. height - actor. height);
1103- actor. set_pivot_point (anchor_x, anchor_y);
1094+ actor. set_pivot_point (
1095+ (actor. x - icon. x) / (icon. width - actor. width),
1096+ (actor. y - icon. y) / (icon. height - actor. height)
1097+ );
11041098
11051099 actor. save_easing_state ();
11061100 actor. set_easing_mode (Clutter . AnimationMode . EASE_IN_EXPO );
1107- actor. set_easing_duration (duration );
1108- actor. set_scale (scale_x, scale_y );
1109- actor. opacity = 0U ;
1101+ actor. set_easing_duration (AnimationDuration . HIDE );
1102+ actor. set_scale (icon . width / actor . width, icon . height / actor . height );
1103+ actor. opacity = 0 ;
11101104 actor. restore_easing_state ();
11111105
1112- ulong minimize_handler_id = 0UL ;
1106+ ulong minimize_handler_id = 0 ;
11131107 minimize_handler_id = actor. transitions_completed. connect (() = > {
11141108 actor. disconnect (minimize_handler_id);
11151109 minimize_completed (actor);
11161110 minimizing. remove (actor);
11171111 });
1118-
11191112 } else {
11201113 actor. set_pivot_point (0.5f , 1.0f );
11211114
11221115 actor. save_easing_state ();
11231116 actor. set_easing_mode (Clutter . AnimationMode . EASE_IN_EXPO );
1124- actor. set_easing_duration (duration );
1125- actor. set_scale (0.0f , 0.0f );
1126- actor. opacity = 0U ;
1117+ actor. set_easing_duration (AnimationDuration . HIDE );
1118+ actor. set_scale (0.0 , 0.0 );
1119+ actor. opacity = 0 ;
11271120 actor. restore_easing_state ();
11281121
1129- ulong minimize_handler_id = 0UL ;
1122+ ulong minimize_handler_id = 0 ;
11301123 minimize_handler_id = actor. transitions_completed. connect (() = > {
11311124 actor. disconnect (minimize_handler_id);
11321125 actor. set_pivot_point (0.0f , 0.0f );
1133- actor. set_scale (1.0f , 1.0f );
1134- actor. opacity = 255U ;
11351126 minimize_completed (actor);
11361127 minimizing. remove (actor);
11371128 });
0 commit comments