overviewControls: update slide in translations from pageEmpty
Now that we unified animation times, move in controls together with the new view. https://bugzilla.gnome.org/show_bug.cgi?id=694064
This commit is contained in:
parent
4505c38b58
commit
ccb81919f7
@ -133,12 +133,12 @@ const SlidingControl = new Lang.Class({
|
|||||||
return visibleWidth;
|
return visibleWidth;
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateTranslation: function(slidingIn) {
|
_updateTranslation: function() {
|
||||||
let translationStart = 0;
|
let translationStart = 0;
|
||||||
let translationEnd = 0;
|
let translationEnd = 0;
|
||||||
let translation = this._getTranslation();
|
let translation = this._getTranslation();
|
||||||
|
|
||||||
if (slidingIn) {
|
if (this.visible) {
|
||||||
translationStart = translation;
|
translationStart = translation;
|
||||||
} else {
|
} else {
|
||||||
translationEnd = translation;
|
translationEnd = translation;
|
||||||
@ -171,14 +171,13 @@ const SlidingControl = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
slideIn: function() {
|
slideIn: function() {
|
||||||
this._updateTranslation(true);
|
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
// we will update slideX from pageEmpty
|
// we will update slideX and the translation from pageEmpty
|
||||||
},
|
},
|
||||||
|
|
||||||
slideOut: function() {
|
slideOut: function() {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this._updateTranslation(false);
|
this._updateTranslation();
|
||||||
// we will update slideX from pageEmpty
|
// we will update slideX from pageEmpty
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -188,6 +187,7 @@ const SlidingControl = new Lang.Class({
|
|||||||
// the next page, since slideIn or slideOut might have been called,
|
// the next page, since slideIn or slideOut might have been called,
|
||||||
// changing the visiblity
|
// changing the visiblity
|
||||||
this.layout.slideX = this.getSlide();
|
this.layout.slideX = this.getSlide();
|
||||||
|
this._updateTranslation();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user