[gnome-shell/wip/fmuellner/notification-redux: 98/128] dateMenu: Fix for RTL layouts
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/notification-redux: 98/128] dateMenu: Fix for RTL layouts
- Date: Tue, 17 Feb 2015 11:27:54 +0000 (UTC)
commit af8ba54841d43c91c0a244d26aab4c1ce7b4e794
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Feb 16 03:23:52 2015 +0100
dateMenu: Fix for RTL layouts
js/ui/dateMenu.js | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js
index f6ad5b2..7a1b54b 100644
--- a/js/ui/dateMenu.js
+++ b/js/ui/dateMenu.js
@@ -153,6 +153,7 @@ const WorldClocksSection = new Lang.Class({
let title = (this._locations.length == 0) ? _("Add world clocks...")
: _("World Clocks");
let header = new St.Label({ style_class: 'world-clocks-header',
+ x_align: Clutter.ActorAlign.START,
text: title });
layout.attach(header, 0, 0, 2, 1);
@@ -163,12 +164,18 @@ const WorldClocksSection = new Lang.Class({
text: l.get_city_name(),
x_align: Clutter.ActorAlign.START,
x_expand: true });
- layout.attach(label, 0, i + 1, 1, 1);
let time = new St.Label({ style_class: 'world-clocks-time',
x_align: Clutter.ActorAlign.END,
x_expand: true });
- layout.attach(time, 1, i + 1, 1, 1);
+
+ if (this._grid.text_direction == Clutter.TextDirection.RTL) {
+ layout.attach(time, 0, i + 1, 1, 1);
+ layout.attach(label, 1, i + 1, 1, 1);
+ } else {
+ layout.attach(label, 0, i + 1, 1, 1);
+ layout.attach(time, 1, i + 1, 1, 1);
+ }
this._locations[i].actor = time;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]