ubuntu-sdk-team team mailing list archive
-
ubuntu-sdk-team team
-
Mailing list archive
-
Message #00988
[Merge] lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/rtlBackButtonIconName into lp:ubuntu-ui-toolkit/staging
Christian Dywan has proposed merging lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/rtlBackButtonIconName into lp:ubuntu-ui-toolkit/staging.
Commit message:
Use layoutDirection to select icon for Back button
Requested reviews:
Ubuntu SDK team (ubuntu-sdk-team)
Related bugs:
Bug #1665938 in ubuntu-ui-toolkit (Ubuntu): "Pagestack backAction should point to the right in RTL"
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1665938
For more details, see:
https://code.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/rtlBackButtonIconName/+merge/319668
Since we don't know how long it'll take for the theme to get the missing -rtl icon (bug 1666607), and there's one precedent for this same hack with the ProgressionSlot in ListItem (bug 1672322), I decided to afterall propose a modified version of the hack using existing icon names based on the LayoutDirection.
Note that FIXMEs in the code now point to the icon theme bug reports.
--
Your team Ubuntu SDK team is requested to review the proposed merge of lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/rtlBackButtonIconName into lp:ubuntu-ui-toolkit/staging.
=== modified file 'src/imports/Components/1.3/PageStack.qml'
--- src/imports/Components/1.3/PageStack.qml 2016-05-25 12:48:10 +0000
+++ src/imports/Components/1.3/PageStack.qml 2017-03-13 10:02:48 +0000
@@ -219,8 +219,9 @@
// used when the Page has a Page.header property set.
id: backAction
visible: pageStack.depth > 1
- iconName: "back"
- text: "Back"
+ // FIXME: lp#1666607
+ iconName: Qt.application.layoutDirection == Qt.RightToLeft ? "next": "back"
+ text: i18n.tr("Back")
onTriggered: pageStack.pop()
objectName: "pagestack_back_action"
}
=== modified file 'src/imports/Components/1.3/ProgressionSlot.qml'
--- src/imports/Components/1.3/ProgressionSlot.qml 2016-05-25 12:48:10 +0000
+++ src/imports/Components/1.3/ProgressionSlot.qml 2017-03-13 10:02:48 +0000
@@ -54,6 +54,7 @@
Icon {
height: units.gu(2)
width: height
+ // FIXME: lp#1672322
name: LayoutMirroring.enabled ? "go-previous" : "go-next"
SlotsLayout.position: SlotsLayout.Last
}
Follow ups