Animate panel appearance on startup
This commit is contained in:
parent
8a0cebccdc
commit
8ef48ca33c
@ -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));
|
||||
|
@ -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() +
|
||||
|
Loading…
Reference in New Issue
Block a user