Animate panel appearance on startup

This commit is contained in:
Colin Walters 2009-07-02 00:52:21 -04:00
parent 8a0cebccdc
commit 8ef48ca33c
2 changed files with 12 additions and 0 deletions

View File

@ -88,6 +88,8 @@ function start() {
}
});
panel.startupAnimation();
let display = global.screen.get_display();
display.connect('overlay-key', Lang.bind(overlay, overlay.toggle));
global.connect('panel-main-menu', Lang.bind(overlay, overlay.toggle));

View File

@ -7,6 +7,7 @@ const Lang = imports.lang;
const Mainloop = imports.mainloop;
const Meta = imports.gi.Meta;
const Shell = imports.gi.Shell;
const Tweener = imports.ui.tweener;
const Button = imports.ui.button;
const Main = imports.ui.main;
@ -176,6 +177,15 @@ Panel.prototype = {
this._updateClock();
},
startupAnimation: function() {
this.actor.y = -this.actor.height;
Tweener.addTween(this.actor,
{ y: 0,
time: 0.2,
transition: "easeOutQuad"
});
},
_updateClock: function() {
let displayDate = new Date();
let msecRemaining = 60000 - (1000 * displayDate.getSeconds() +