autohide sidebar in compact mode (v3)

https://bugzilla.gnome.org/show_bug.cgi?id=604118
This commit is contained in:
Florian Scandella
2009-12-02 21:35:11 +01:00
committed by Colin Walters
parent 8c178378ae
commit 38b20ca0a4
3 changed files with 111 additions and 5 deletions

View File

@@ -373,6 +373,20 @@ WidgetBox.prototype = {
Main.chrome.untrackActor(this._hbox);
},
hide: function() {
if (this.state == Widget.STATE_COLLAPSED)
Tweener.addTween(this._cbox, { x: -Widget.COLLAPSED_WIDTH,
time: ANIMATION_TIME / 2,
transition: "easeOutQuad" });
},
restore: function() {
if (this.state == Widget.STATE_COLLAPSED)
Tweener.addTween(this._cbox, { x: 0,
time: ANIMATION_TIME / 2,
transition: "easeOutQuad" });
},
destroy: function() {
if (this._widget.destroy)
this._widget.destroy();