Merge lp:~haggai-eran/unity-2d/rtl-grid-view-with-spacing-949319 into lp:unity-2d

Proposed by Haggai Eran
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 947
Merged at revision: 967
Proposed branch: lp:~haggai-eran/unity-2d/rtl-grid-view-with-spacing-949319
Merge into: lp:unity-2d
Diff against target: 20 lines (+3/-0)
1 file modified
shell/dash/GridViewWithSpacing.qml (+3/-0)
To merge this branch: bzr merge lp:~haggai-eran/unity-2d/rtl-grid-view-with-spacing-949319
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
Review via email: mp+96459@code.launchpad.net

Commit message

[dash] Fix spacing between elemenets in GridViewWithSpacing, in right-to-left locales (LP: #949319)

Description of the change

This patch fix a small issue with the GridViewWithSpacing item, on right-to-left locales. It fixes the position of the elements so that the spacing between the columns is the same as in the left-to-right version.

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :

Nice one :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shell/dash/GridViewWithSpacing.qml'
2--- shell/dash/GridViewWithSpacing.qml 2011-11-09 12:47:37 +0000
3+++ shell/dash/GridViewWithSpacing.qml 2012-03-07 21:19:27 +0000
4@@ -17,6 +17,7 @@
5 */
6
7 import QtQuick 1.0
8+import "../common/utils.js" as Utils
9
10 GridView {
11 property int horizontalSpacing: 0
12@@ -25,6 +26,8 @@
13 property int rows: 2
14
15 function delegateX(column) {
16+ if (Utils.isRightToLeft())
17+ column = columns - 1 - column
18 return column * horizontalSpacing / columns
19 }
20 function delegateY(row) {

Subscribers

People subscribed via source and target branches