overviewControls: Slide dash and workspace switcher when entering and exiting overview
Adds a slide in effect to dash and workspace switcher when entering the overview and adds a slide out effect while exiting it. http://bugzilla.gnome.org/show_bug.cgi?id=694262
This commit is contained in:
parent
4afc7438a6
commit
6a7fa52879
@ -207,6 +207,7 @@ const SlidingControl = new Lang.Class({
|
|||||||
|
|
||||||
slideIn: function() {
|
slideIn: function() {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
this._updateTranslation();
|
||||||
// we will update slideX and the translation from pageEmpty
|
// we will update slideX and the translation from pageEmpty
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -246,6 +247,7 @@ const ThumbnailsSlider = new Lang.Class({
|
|||||||
this.actor.add_actor(this._thumbnailsBox.actor);
|
this.actor.add_actor(this._thumbnailsBox.actor);
|
||||||
|
|
||||||
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this.updateSlide));
|
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this.updateSlide));
|
||||||
|
Main.overview.connect('hiding', Lang.bind(this, this.slideOut));
|
||||||
this.actor.connect('notify::hover', Lang.bind(this, this.updateSlide));
|
this.actor.connect('notify::hover', Lang.bind(this, this.updateSlide));
|
||||||
this._thumbnailsBox.actor.bind_property('visible', this.actor, 'visible', GObject.BindingFlags.SYNC_CREATE);
|
this._thumbnailsBox.actor.bind_property('visible', this.actor, 'visible', GObject.BindingFlags.SYNC_CREATE);
|
||||||
},
|
},
|
||||||
@ -273,6 +275,13 @@ const ThumbnailsSlider = new Lang.Class({
|
|||||||
return alwaysZoomOut;
|
return alwaysZoomOut;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onOverviewShowing: function() {
|
||||||
|
this.visible = true;
|
||||||
|
this.layout.slideX = this.getSlide();
|
||||||
|
this.actor.translation_x = this._getTranslation();
|
||||||
|
this.slideIn();
|
||||||
|
},
|
||||||
|
|
||||||
getNonExpandedWidth: function() {
|
getNonExpandedWidth: function() {
|
||||||
let child = this.actor.get_first_child();
|
let child = this.actor.get_first_child();
|
||||||
return child.get_theme_node().get_length('visible-width');
|
return child.get_theme_node().get_length('visible-width');
|
||||||
@ -323,6 +332,7 @@ const DashSlider = new Lang.Class({
|
|||||||
this.actor.add_actor(this._dash.actor);
|
this.actor.add_actor(this._dash.actor);
|
||||||
|
|
||||||
this._dash.connect('icon-size-changed', Lang.bind(this, this.updateSlide));
|
this._dash.connect('icon-size-changed', Lang.bind(this, this.updateSlide));
|
||||||
|
Main.overview.connect('hiding', Lang.bind(this, this.slideOut));
|
||||||
},
|
},
|
||||||
|
|
||||||
getSlide: function() {
|
getSlide: function() {
|
||||||
@ -332,6 +342,13 @@ const DashSlider = new Lang.Class({
|
|||||||
return 0;
|
return 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onOverviewShowing: function() {
|
||||||
|
this.visible = true;
|
||||||
|
this.layout.slideX = this.getSlide();
|
||||||
|
this.actor.translation_x = this._getTranslation();
|
||||||
|
this.slideIn();
|
||||||
|
},
|
||||||
|
|
||||||
_onWindowDragBegin: function() {
|
_onWindowDragBegin: function() {
|
||||||
this.fadeHalf();
|
this.fadeHalf();
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user