[gnome-shell] overviewControls: fix math for translations when sliding in
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] overviewControls: fix math for translations when sliding in
- Date: Mon, 18 Feb 2013 14:34:27 +0000 (UTC)
commit 4505c38b5882cd867d661ff7aeb3a54830652d7f
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Feb 18 01:24:40 2013 -0500
overviewControls: fix math for translations when sliding in
The math to compute translations was wrong when sliding in; also, don't
depend on the slide value for the translation anymore.
https://bugzilla.gnome.org/show_bug.cgi?id=694064
js/ui/overviewControls.js | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
index f1e0687..f965020 100644
--- a/js/ui/overviewControls.js
+++ b/js/ui/overviewControls.js
@@ -125,14 +125,12 @@ const SlidingControl = new Lang.Class({
_getTranslation: function() {
let child = this.actor.get_first_child();
let direction = getRtlSlideDirection(this.layout.slideDirection, child);
-
- let slide = this.getSlide();
let visibleWidth = this.getVisibleWidth();
if (direction == SlideDirection.LEFT)
- return ((slide - 1) * visibleWidth);
+ return - visibleWidth;
else
- return ((1 - slide) * visibleWidth);
+ return visibleWidth;
},
_updateTranslation: function(slidingIn) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]