diff options
author | Florian Müllner <fmuellner@gnome.org> | 2015-03-14 22:49:22 +0100 |
---|---|---|
committer | Florian Müllner <fmuellner@gnome.org> | 2015-03-15 19:41:44 +0100 |
commit | 96c88708207d0c8b069e267c7e8ae77b4c98b557 (patch) | |
tree | 67b7ac78bd576178ae2637c12184b15dcc40f817 | |
parent | 177e9316b08e4effb1a54710af0923d60f5fb089 (diff) | |
download | gnome-shell-96c88708207d0c8b069e267c7e8ae77b4c98b557.tar.gz |
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
-rw-r--r-- | 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 34711fdee..648f6fa76 100644 --- a/js/ui/viewSelector.js +++ b/js/ui/viewSelector.js @@ -214,10 +214,13 @@ const ViewSelector = new Lang.Class({ Shell.ActionMode.OVERVIEW, Lang.bind(Main.overview, Main.overview.toggle)); - let gesture; - - gesture = new EdgeDragAction.EdgeDragAction(St.Side.LEFT, - Shell.ActionMode.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.ActionMode.NORMAL); gesture.connect('activated', Lang.bind(this, function() { if (Main.overview.visible) Main.overview.hide(); |