[gnome-shell] Animate panel appearance on startup
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-shell] Animate panel appearance on startup
- Date: Thu, 2 Jul 2009 05:04:53 +0000 (UTC)
commit 8ef48ca33cd7d9b808f5b3f7cf82d1ca44b7b9e1
Author: Colin Walters <walters verbum org>
Date: Thu Jul 2 00:52:21 2009 -0400
Animate panel appearance on startup
js/ui/main.js | 2 ++
js/ui/panel.js | 10 ++++++++++
2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/main.js b/js/ui/main.js
index a9d8f07..603ac39 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -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));
diff --git a/js/ui/panel.js b/js/ui/panel.js
index a4a9390..24ac5d2 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -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() +
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]