mirror of
https://github.com/elementary/gala.git
synced 2024-12-27 03:04:08 +03:00
change menu animations
This commit is contained in:
parent
4d29e6bb5b
commit
31bc0bc910
@ -301,6 +301,18 @@ namespace Gala
|
|||||||
case WindowType.MENU:
|
case WindowType.MENU:
|
||||||
case WindowType.DROPDOWN_MENU:
|
case WindowType.DROPDOWN_MENU:
|
||||||
case WindowType.POPUP_MENU:
|
case WindowType.POPUP_MENU:
|
||||||
|
actor.scale_gravity = Clutter.Gravity.CENTER;
|
||||||
|
actor.rotation_center_x = {0, 0, 10};
|
||||||
|
actor.scale_x = 0.9f;
|
||||||
|
actor.scale_y = 0.9f;
|
||||||
|
actor.opacity = 0;
|
||||||
|
actor.animate (Clutter.AnimationMode.EASE_OUT_QUAD, 150,
|
||||||
|
scale_x:1.0f, scale_y:1.0f, opacity:255)
|
||||||
|
.completed.connect ( () => {
|
||||||
|
map_completed (actor);
|
||||||
|
actor.meta_window.activate (screen.get_display ().get_current_time ());
|
||||||
|
});
|
||||||
|
break;
|
||||||
case WindowType.MODAL_DIALOG:
|
case WindowType.MODAL_DIALOG:
|
||||||
case WindowType.DIALOG:
|
case WindowType.DIALOG:
|
||||||
int y;
|
int y;
|
||||||
@ -334,7 +346,7 @@ namespace Gala
|
|||||||
actor.scale_gravity = Clutter.Gravity.CENTER;
|
actor.scale_gravity = Clutter.Gravity.CENTER;
|
||||||
actor.rotation_center_x = {0, actor.height, 10};
|
actor.rotation_center_x = {0, actor.height, 10};
|
||||||
actor.show ();
|
actor.show ();
|
||||||
actor.animate (Clutter.AnimationMode.EASE_IN_QUAD, 250,
|
actor.animate (Clutter.AnimationMode.EASE_IN_QUAD, 200,
|
||||||
scale_x:0.95f, scale_y:0.95f, opacity:0, rotation_angle_x:15.0f)
|
scale_x:0.95f, scale_y:0.95f, opacity:0, rotation_angle_x:15.0f)
|
||||||
.completed.connect ( () => {
|
.completed.connect ( () => {
|
||||||
destroy_completed (actor);
|
destroy_completed (actor);
|
||||||
@ -343,6 +355,12 @@ namespace Gala
|
|||||||
case WindowType.MENU:
|
case WindowType.MENU:
|
||||||
case WindowType.DROPDOWN_MENU:
|
case WindowType.DROPDOWN_MENU:
|
||||||
case WindowType.POPUP_MENU:
|
case WindowType.POPUP_MENU:
|
||||||
|
actor.scale_gravity = Clutter.Gravity.CENTER;
|
||||||
|
actor.animate (Clutter.AnimationMode.EASE_OUT_QUAD, 200,
|
||||||
|
scale_x:0.9f, scale_y:0.9f, opacity:0).completed.connect ( () => {
|
||||||
|
destroy_completed (actor);
|
||||||
|
});
|
||||||
|
break;
|
||||||
case WindowType.MODAL_DIALOG:
|
case WindowType.MODAL_DIALOG:
|
||||||
case WindowType.DIALOG:
|
case WindowType.DIALOG:
|
||||||
actor.scale_gravity = Clutter.Gravity.NORTH;
|
actor.scale_gravity = Clutter.Gravity.NORTH;
|
||||||
@ -350,7 +368,7 @@ namespace Gala
|
|||||||
scale_y:0.0f, opacity:0).completed.connect ( () => {
|
scale_y:0.0f, opacity:0).completed.connect ( () => {
|
||||||
destroy_completed (actor);
|
destroy_completed (actor);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
destroy_completed (actor);
|
destroy_completed (actor);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user