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
This commit is contained in:
parent
177e9316b0
commit
96c8870820
@ -214,10 +214,13 @@ const ViewSelector = new Lang.Class({
|
|||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(Main.overview, Main.overview.toggle));
|
Lang.bind(Main.overview, Main.overview.toggle));
|
||||||
|
|
||||||
let gesture;
|
let side;
|
||||||
|
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
|
||||||
gesture = new EdgeDragAction.EdgeDragAction(St.Side.LEFT,
|
side = St.Side.RIGHT;
|
||||||
Shell.ActionMode.NORMAL);
|
else
|
||||||
|
side = St.Side.LEFT;
|
||||||
|
let gesture = new EdgeDragAction.EdgeDragAction(side,
|
||||||
|
Shell.ActionMode.NORMAL);
|
||||||
gesture.connect('activated', Lang.bind(this, function() {
|
gesture.connect('activated', Lang.bind(this, function() {
|
||||||
if (Main.overview.visible)
|
if (Main.overview.visible)
|
||||||
Main.overview.hide();
|
Main.overview.hide();
|
||||||
|
Loading…
Reference in New Issue
Block a user