[gnome-shell/wip/paging-release: 39/85] Fixed RTL languages
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/paging-release: 39/85] Fixed RTL languages
- Date: Mon, 12 Aug 2013 15:52:10 +0000 (UTC)
commit ff6639658759c4e2fc274140fb9715ac9d06cf6e
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 1cdffef..c2ae64a 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 fcd1c16..1b2db7a 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]