[gnome-shell] app-display: Popup menus to the left in RTL locales
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] app-display: Popup menus to the left in RTL locales
- Date: Tue, 30 Nov 2010 23:02:47 +0000 (UTC)
commit 08b84b144948c01eb3073d7241adf0c8baeaeb11
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Nov 29 22:07:10 2010 +0100
app-display: Popup menus to the left in RTL locales
The popup menus of application icons in both the dash and the app view
are positioned on the right of the icon. In the case of the dash this
results in the menu being displayed off-screen in RTL locales, so move it
to the opposite side instead.
https://bugzilla.gnome.org/show_bug.cgi?id=635645
js/ui/appDisplay.js | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index a314098..0cdb5dd 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -491,7 +491,11 @@ AppIconMenu.prototype = {
__proto__: PopupMenu.PopupMenu.prototype,
_init: function(source) {
- PopupMenu.PopupMenu.prototype._init.call(this, source.actor, St.Align.MIDDLE, St.Side.LEFT, 0);
+ let side = St.Side.LEFT;
+ if (St.Widget.get_default_direction() == St.TextDirection.RTL)
+ side = St.Side.RIGHT;
+
+ PopupMenu.PopupMenu.prototype._init.call(this, source.actor, St.Align.MIDDLE, side, 0);
this._source = source;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]