[gnome-shell/wip/paging] Fixed RTL languages
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/paging] Fixed RTL languages
- Date: Fri, 12 Jul 2013 13:44:34 +0000 (UTC)
commit 0b264f964b292d1676745a9b5e360a7740499d43
Author: Carlos Soriano <carlos soriano89 gmail com>
Date: Fri Jul 12 15:43:57 2013 +0200
Fixed RTL languages
js/ui/appDisplay.js | 5 ++++-
js/ui/iconGrid.js | 5 ++---
2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index f073b56..91e2ecf 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -651,7 +651,10 @@ const AllView = new Lang.Class({
this.actor = new St.Widget({ layout_manager: layout,
x_expand:true, y_expand:true });
layout.add(this._paginationView, 2,2);
- layout.add(this._paginationIndicator, 3,2);
+ if(Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
+ layout.add(this._paginationIndicator, 2,2);
+ else
+ layout.add(this._paginationIndicator, 3,2);
for(let i = 0; i < MAX_APPS_PAGES; i++) {
let indicatorIcon = new PaginationIconIndicator(this, i);
if(i == 0) {
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index 610858a..2da474f 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -334,7 +334,7 @@ const IconGrid = new Lang.Class({
this._firstPagesItems = [children[0]];
}
for (let i = 0; i < children.length; i++) {
- let childBox = this._calculateChildrenBox(children[i], x, y);
+ let childBox = this._calculateChildrenBox(children[i], x, y, box);
if(children[i].translate_y) {
childBox.y1 += children[i].translate_y;
childBox.y2 += children[i].translate_y;
@@ -391,7 +391,7 @@ const IconGrid = new Lang.Class({
this._childrenPerPage = nColumns * this._rowsPerPage;
},
- _calculateChildrenBox: function(child, x, y) {
+ _calculateChildrenBox: function(child, x, y, box) {
let [childMinWidth, childMinHeight, childNaturalWidth, childNaturalHeight]
= child.get_preferred_size();
@@ -403,7 +403,6 @@ const IconGrid = new Lang.Class({
let childBox = new Clutter.ActorBox();
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) {
- //FIXME not defined box????????
let _x = box.x2 - (x + width);
childBox.x1 = Math.floor(_x - childXSpacing);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]