mlutfy/hidetopbar — pull request #3 by tuxor1337 (2013-01-05 17:25:11+00:00)
Title: Four suggestions for a smoother animation

1) In _showTopPanel don't add a Tween for the height of the panel but rather add a Tween for the y position of the panel. The trick is to set the y position to -PANEL_HEIGHT, resetting the panel height to the original panel height and then tweening with respect to y. The effect is a much smoother animation:

_showTopPanel: function() {
Main.panel.actor.y=-PANEL_HEIGHT;
Main.panel.actor.height=PANEL_HEIGHT;
Tweener.addTween(Main.panel.actor, {
y: 0,

2) What renders the animation even smoother is connecting to the "showing" event instead of the "shown" event of Main.overview.

3) In order for the panel not to slide over the search bar in overview, you will want to add
Main.overview._relayout();
somewhere to the end of _showTopPanel. But please note that this won't work when connected to the "shown" event (see 2).

4) I personally like it better when the _rightBox, _centerBox and _leftBox appear simultaneously with the whole panel and thus recommend you to add this Tween after the panel's tween instead of putting it inside of onComplete.