[gnome-shell/gnome-3-14] viewSelector: Mirror open-app-view edge drag gesture for RTL
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-14] viewSelector: Mirror open-app-view edge drag gesture for RTL
- Date: Tue, 17 Mar 2015 09:27:46 +0000 (UTC)
commit 4b0cbafdcd0e5d7330b06c0e00a39de29bd0efc3
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Mar 14 22:49:22 2015 +0100
viewSelector: Mirror open-app-view edge drag gesture for RTL
It makes sense for the gesture to reflect the position of the
activities button / dash. In RTL locales, those are located on
the right rather than the left, so make the gesture apply to
the opposite edge in that case.
https://bugzilla.gnome.org/show_bug.cgi?id=737502
js/ui/viewSelector.js | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 57395e3..c2ef9e5 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -214,10 +214,13 @@ const ViewSelector = new Lang.Class({
Shell.KeyBindingMode.OVERVIEW,
Lang.bind(Main.overview, Main.overview.toggle));
- let gesture;
-
- gesture = new EdgeDragAction.EdgeDragAction(St.Side.LEFT,
- Shell.KeyBindingMode.NORMAL);
+ let side;
+ if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
+ side = St.Side.RIGHT;
+ else
+ side = St.Side.LEFT;
+ let gesture = new EdgeDragAction.EdgeDragAction(side,
+ Shell.KeyBindingMode.NORMAL);
gesture.connect('activated', Lang.bind(this, function() {
if (Main.overview.visible)
Main.overview.hide();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]