[gnome-shell] calendar: Fix events for RTL locales
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] calendar: Fix events for RTL locales
- Date: Tue, 24 Jun 2014 22:03:32 +0000 (UTC)
commit 256bb532a24246703af3d79d4f44fea6deff98e8
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Jun 20 16:30:46 2014 +0200
calendar: Fix events for RTL locales
Unlike StTable, ClutterTableLayout does not take the actor's text
direction into account, so mirror columns ourselves now.
https://bugzilla.gnome.org/show_bug.cgi?id=731923
js/ui/calendar.js | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index 5a387f1..35e35e9 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -734,8 +734,10 @@ const EventsList = new Lang.Class({
dayLabel.clutter_text.line_wrap = false;
dayLabel.clutter_text.ellipsize = false;
+ let rtl = this.actor.get_text_direction() == Clutter.TextDirection.RTL;
+
let layout = this.actor.layout_manager;
- layout.pack(dayLabel, 0, index);
+ layout.pack(dayLabel, rtl ? 2 : 0, index);
layout.child_set(dayLabel, { x_expand: false,
x_align: Clutter.TableAlignment.END,
y_align: Clutter.TableAlignment.START });
@@ -756,7 +758,7 @@ const EventsList = new Lang.Class({
titleLabel.clutter_text.line_wrap = true;
titleLabel.clutter_text.ellipsize = false;
- layout.pack(titleLabel, 2, index);
+ layout.pack(titleLabel, rtl ? 0 : 2, index);
layout.child_set(titleLabel, { x_expand: true });
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]