[gnome-shell] Revert "overviewControls: Don't allow appearing controls to "pop in""
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Revert "overviewControls: Don't allow appearing controls to "pop in""
- Date: Thu, 26 Sep 2013 20:21:09 +0000 (UTC)
commit 508a511d2a4ad4b2b545f7ae5c5a7fafd50afef0
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Sep 26 16:20:06 2013 -0400
Revert "overviewControls: Don't allow appearing controls to "pop in""
This reverts commit e31693bbeea706bc646298d935e5e55e9ef01565.
This doesn't properly adjust the allocation, leading to an unbalanced
overview where things aren't centered properly. Just revert for now,
and we'll rethink this next cycle.
js/ui/overviewControls.js | 35 +++++++++++++++++++++--------------
1 files changed, 21 insertions(+), 14 deletions(-)
---
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
index f531476..c16c4ac 100644
--- a/js/ui/overviewControls.js
+++ b/js/ui/overviewControls.js
@@ -208,12 +208,23 @@ const SlidingControl = new Lang.Class({
slideIn: function() {
this.visible = true;
this._updateTranslation();
+ // we will update slideX and the translation from pageEmpty
},
slideOut: function() {
this.visible = false;
this._updateTranslation();
+ // we will update slideX from pageEmpty
},
+
+ pageEmpty: function() {
+ // When pageEmpty is received, there's no visible view in the
+ // selector; this means we can now safely set the full slide for
+ // the next page, since slideIn or slideOut might have been called,
+ // changing the visiblity
+ this.layout.slideX = this.getSlide();
+ this._updateTranslation();
+ }
});
const ThumbnailsSlider = new Lang.Class({
@@ -589,14 +600,18 @@ const ControlsManager = new Lang.Class({
return;
let activePage = this.viewSelector.getActivePage();
-
let dashVisible = (activePage == ViewSelector.ViewPage.WINDOWS ||
activePage == ViewSelector.ViewPage.APPS);
- if (!dashVisible)
+ let thumbnailsVisible = (activePage == ViewSelector.ViewPage.WINDOWS);
+
+ if (dashVisible)
+ this._dashSlider.slideIn();
+ else
this._dashSlider.slideOut();
- let thumbnailsVisible = (activePage == ViewSelector.ViewPage.WINDOWS);
- if (!thumbnailsVisible)
+ if (thumbnailsVisible)
+ this._thumbnailsSlider.slideIn();
+ else
this._thumbnailsSlider.slideOut();
},
@@ -609,16 +624,8 @@ const ControlsManager = new Lang.Class({
},
_onPageEmpty: function() {
- let activePage = this.viewSelector.getActivePage();
-
- let dashVisible = (activePage == ViewSelector.ViewPage.WINDOWS ||
- activePage == ViewSelector.ViewPage.APPS);
- if (dashVisible)
- this._dashSlider.slideIn();
-
- let thumbnailsVisible = (activePage == ViewSelector.ViewPage.WINDOWS);
- if (thumbnailsVisible)
- this._thumbnailsSlider.slideIn();
+ this._dashSlider.pageEmpty();
+ this._thumbnailsSlider.pageEmpty();
this._updateSpacerVisibility();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]