[gnome-shell] popup-menu: Fix allocation in RTL locales
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] popup-menu: Fix allocation in RTL locales
- Date: Thu, 22 Sep 2011 19:53:03 +0000 (UTC)
commit 5f6dce2b5ca7ef07c6c6b43020390f2a6143c53e
Author: Florian MÃllner <fmuellner gnome org>
Date: Thu Sep 22 15:33:43 2011 +0200
popup-menu: Fix allocation in RTL locales
Commit ed7d4928e5 fixed some width-for-height cases in popup menu items,
but did not consider RTL locales. Fix this.
https://bugzilla.gnome.org/show_bug.cgi?id=659827
js/ui/popupMenu.js | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 53ddc97..3ee3c17 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -320,10 +320,14 @@ PopupBaseMenuItem.prototype = {
}
extraWidth = availWidth - naturalWidth;
} else {
- if (child.span == -1)
- availWidth = box.x2 - x;
- else
+ if (child.span == -1) {
+ if (direction == St.TextDirection.LTR)
+ availWidth = box.x2 - x;
+ else
+ availWidth = x - box.x1;
+ } else {
availWidth = naturalWidth;
+ }
extraWidth = 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]