MultitaskingView: don't set custom easing mode

This commit is contained in:
Danielle Foré 2021-11-05 15:53:34 -07:00 committed by José Expósito
parent e5523a2afb
commit 65da8f7767
3 changed files with 11 additions and 12 deletions

View File

@ -26,7 +26,6 @@ namespace Gala {
*/ */
public class MultitaskingView : Actor, ActivatableComponent { public class MultitaskingView : Actor, ActivatableComponent {
public const int ANIMATION_DURATION = 250; public const int ANIMATION_DURATION = 250;
public const AnimationMode ANIMATION_MODE = AnimationMode.EASE_OUT_QUAD;
private GestureTracker multitasking_gesture_tracker; private GestureTracker multitasking_gesture_tracker;
private GestureTracker workspace_gesture_tracker; private GestureTracker workspace_gesture_tracker;
@ -715,7 +714,7 @@ namespace Gala {
GestureTracker.OnBegin on_animation_begin = () => { GestureTracker.OnBegin on_animation_begin = () => {
clone.set_position (initial_x, initial_y); clone.set_position (initial_x, initial_y);
clone.set_easing_mode (0); clone.set_easing_mode (AnimationMode.LINEAR);
}; };
GestureTracker.OnUpdate on_animation_update = (percentage) => { GestureTracker.OnUpdate on_animation_update = (percentage) => {
@ -724,7 +723,7 @@ namespace Gala {
}; };
GestureTracker.OnEnd on_animation_end = (percentage, cancel_action) => { GestureTracker.OnEnd on_animation_end = (percentage, cancel_action) => {
clone.set_easing_mode (ANIMATION_MODE); clone.set_easing_mode (AnimationMode.EASE_OUT_QUAD);
if (cancel_action) { if (cancel_action) {
return; return;
@ -763,7 +762,7 @@ namespace Gala {
} }
dock.set_easing_duration (ANIMATION_DURATION); dock.set_easing_duration (ANIMATION_DURATION);
dock.set_easing_mode (ANIMATION_MODE); dock.set_easing_mode (AnimationMode.EASE_OUT_QUAD);
dock.y = target_y; dock.y = target_y;
}; };

View File

@ -230,7 +230,7 @@ namespace Gala {
window_icon.opacity = 0; window_icon.opacity = 0;
window_icon.set_pivot_point (0.5f, 0.5f); window_icon.set_pivot_point (0.5f, 0.5f);
window_icon.set_easing_duration (MultitaskingView.ANIMATION_DURATION); window_icon.set_easing_duration (MultitaskingView.ANIMATION_DURATION);
window_icon.set_easing_mode (MultitaskingView.ANIMATION_MODE); window_icon.set_easing_mode (AnimationMode.EASE_OUT_QUAD);
set_window_icon_position (window_frame_rect.width, window_frame_rect.height); set_window_icon_position (window_frame_rect.width, window_frame_rect.height);
window_title = new Tooltip (); window_title = new Tooltip ();
@ -390,7 +390,7 @@ namespace Gala {
} }
save_easing_state (); save_easing_state ();
set_easing_mode (MultitaskingView.ANIMATION_MODE); set_easing_mode (AnimationMode.EASE_OUT_QUAD);
set_easing_duration (animate ? MultitaskingView.ANIMATION_DURATION : 0); set_easing_duration (animate ? MultitaskingView.ANIMATION_DURATION : 0);
set_position (target_x, target_y); set_position (target_x, target_y);
@ -462,7 +462,7 @@ namespace Gala {
save_easing_state (); save_easing_state ();
set_easing_duration (MultitaskingView.ANIMATION_DURATION); set_easing_duration (MultitaskingView.ANIMATION_DURATION);
set_easing_mode (MultitaskingView.ANIMATION_MODE); set_easing_mode (AnimationMode.EASE_OUT_QUAD);
set_size (rect.width, rect.height); set_size (rect.width, rect.height);
set_position (rect.x, rect.y); set_position (rect.x, rect.y);
@ -612,7 +612,7 @@ namespace Gala {
var shadow_transition = new PropertyTransition ("shadow-opacity") { var shadow_transition = new PropertyTransition ("shadow-opacity") {
duration = MultitaskingView.ANIMATION_DURATION, duration = MultitaskingView.ANIMATION_DURATION,
remove_on_complete = true, remove_on_complete = true,
progress_mode = MultitaskingView.ANIMATION_MODE progress_mode = AnimationMode.EASE_OUT_QUAD
}; };
if (show) if (show)

View File

@ -355,13 +355,13 @@ namespace Gala {
save_easing_state (); save_easing_state ();
set_easing_duration (MultitaskingView.ANIMATION_DURATION); set_easing_duration (MultitaskingView.ANIMATION_DURATION);
set_easing_mode (MultitaskingView.ANIMATION_MODE); set_easing_mode (AnimationMode.EASE_OUT_QUAD);
set_x (target_x); set_x (target_x);
restore_easing_state (); restore_easing_state ();
background.save_easing_state (); background.save_easing_state ();
background.set_easing_duration (MultitaskingView.ANIMATION_DURATION); background.set_easing_duration (MultitaskingView.ANIMATION_DURATION);
background.set_easing_mode (MultitaskingView.ANIMATION_MODE); background.set_easing_mode (AnimationMode.EASE_OUT_QUAD);
background.set_scale (scale, scale); background.set_scale (scale, scale);
background.restore_easing_state (); background.restore_easing_state ();
}; };
@ -425,13 +425,13 @@ namespace Gala {
save_easing_state (); save_easing_state ();
set_easing_duration (MultitaskingView.ANIMATION_DURATION); set_easing_duration (MultitaskingView.ANIMATION_DURATION);
set_easing_mode (MultitaskingView.ANIMATION_MODE); set_easing_mode (AnimationMode.EASE_OUT_QUAD);
set_x (target_x); set_x (target_x);
restore_easing_state (); restore_easing_state ();
background.save_easing_state (); background.save_easing_state ();
background.set_easing_duration (MultitaskingView.ANIMATION_DURATION); background.set_easing_duration (MultitaskingView.ANIMATION_DURATION);
background.set_easing_mode (MultitaskingView.ANIMATION_MODE); background.set_easing_mode (AnimationMode.EASE_OUT_QUAD);
background.set_scale (1, 1); background.set_scale (1, 1);
background.restore_easing_state (); background.restore_easing_state ();
}; };