mirror of
https://github.com/elementary/gala.git
synced 2024-11-30 00:44:06 +03:00
PanelClone: avoid using Timeout (#2015)
Co-authored-by: Ryan Kornheisl <ryan@skarva.tech> Co-authored-by: Leonhard <106322251+leolost2605@users.noreply.github.com>
This commit is contained in:
parent
2f95be4c8d
commit
5adb5544f0
@ -146,18 +146,21 @@ public class Gala.PanelClone : Object {
|
||||
return;
|
||||
}
|
||||
|
||||
var animation_duration = get_animation_duration ();
|
||||
|
||||
clone.save_easing_state ();
|
||||
clone.set_easing_mode (Clutter.AnimationMode.EASE_OUT_QUAD);
|
||||
clone.set_easing_duration (animation_duration);
|
||||
clone.set_easing_duration (get_animation_duration ());
|
||||
clone.y = calculate_clone_y (false);
|
||||
clone.restore_easing_state ();
|
||||
|
||||
Timeout.add (animation_duration, () => {
|
||||
unowned var y_transition = clone.get_transition ("y");
|
||||
if (y_transition != null) {
|
||||
y_transition.completed.connect (() => {
|
||||
clone.visible = false;
|
||||
panel_hidden = false;
|
||||
return Source.REMOVE;
|
||||
});
|
||||
} else {
|
||||
clone.visible = false;
|
||||
panel_hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user