[gnome-shell] overviewControls: Use correct translation in dragBegin
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] overviewControls: Use correct translation in dragBegin
- Date: Mon, 1 Sep 2014 22:20:13 +0000 (UTC)
commit 38c70e73b9e6a2e64533d5e2c48229e65a948ca5
Author: Florian Müllner <fmuellner gnome org>
Date: Sun Aug 31 02:20:43 2014 +0200
overviewControls: Use correct translation in dragBegin
Commit 12845f0eefa reset translationX to 0 to fix the slide-in
animation of the dash when dragging a search result, but 0 is the
wrong value for the thumbnail slider - the next time it will be
shown, it will just pop up instead of sliding in due to translationX
already being at its target value.
Fix this by making _updateTranslation take the actual visibility into
account and call that to set the correct translation in dragBegin.
js/ui/overviewControls.js | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
index 4bd3d67..02423f2 100644
--- a/js/ui/overviewControls.js
+++ b/js/ui/overviewControls.js
@@ -161,7 +161,8 @@ const SlidingControl = new Lang.Class({
let translationEnd = 0;
let translation = this._getTranslation();
- if (this._visible) {
+ let shouldShow = (this._getSlide() > 0);
+ if (shouldShow) {
translationStart = translation;
} else {
translationEnd = translation;
@@ -192,7 +193,7 @@ const SlidingControl = new Lang.Class({
_onDragBegin: function() {
this._inDrag = true;
- this.layout.translationX = 0;
+ this._updateTranslation();
this._updateSlide();
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]