← Back to team overview

ubuntu-sdk-team team mailing list archive

[Merge] lp:~daker/ubuntu-ui-toolkit/fix.1665944 into lp:ubuntu-ui-toolkit/staging

 

Adnane Belmadiaf has proposed merging lp:~daker/ubuntu-ui-toolkit/fix.1665944 into lp:ubuntu-ui-toolkit/staging.

Commit message:
Fix ListItem title/subtitle alignment & elide in RTL mode

Requested reviews:
  Ubuntu SDK team (ubuntu-sdk-team)
Related bugs:
  Bug #1665944 in ubuntu-ui-toolkit (Ubuntu): "ListItem title/subtitle should be aligned to the right in RTL mode"
  https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1665944

For more details, see:
https://code.launchpad.net/~daker/ubuntu-ui-toolkit/fix.1665944/+merge/317712

Fix ListItem title/subtitle alignment & elide in RTL mode
-- 
Your team Ubuntu SDK team is requested to review the proposed merge of lp:~daker/ubuntu-ui-toolkit/fix.1665944 into lp:ubuntu-ui-toolkit/staging.
=== modified file 'src/imports/Components/ListItems/1.3/LabelVisual.qml'
--- src/imports/Components/ListItems/1.3/LabelVisual.qml	2016-01-27 13:58:29 +0000
+++ src/imports/Components/ListItems/1.3/LabelVisual.qml	2017-02-19 00:21:09 +0000
@@ -30,7 +30,8 @@
         return item.parent.hasOwnProperty("pointerTarget") || label.isInsideOverlay(item.parent)
     }
 
-    elide: Text.ElideRight
+    horizontalAlignment: Qt.application.layoutDirection == Qt.RightToLeft ? Text.AlignRight: Text.AlignLeft
+    elide: Qt.application.layoutDirection == Qt.RightToLeft ? Text.ElideLeft: Text.ElideRight
     color: selected
            ? theme.palette.selected.backgroundText
            : (secondary


References