Merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/rtlBackButtonIconName into lp:ubuntu-ui-toolkit/staging

Proposed by Cris Dywan
Status: Merged
Approved by: Cris Dywan
Approved revision: 2186
Merged at revision: 2187
Proposed branch: lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/rtlBackButtonIconName
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 27 lines (+4/-2)
2 files modified
src/imports/Components/1.3/PageStack.qml (+3/-2)
src/imports/Components/1.3/ProgressionSlot.qml (+1/-0)
To merge this branch: bzr merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/rtlBackButtonIconName
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Adnane Belmadiaf (community) Approve
Ubuntu SDK team Pending
Review via email: mp+319668@code.launchpad.net

Commit message

Use layoutDirection to select icon for Back button

Description of the change

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.

To post a comment you must log in.
Revision history for this message
Adnane Belmadiaf (daker) wrote :

+1

review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/imports/Components/1.3/PageStack.qml'
2--- src/imports/Components/1.3/PageStack.qml 2016-05-25 12:48:10 +0000
3+++ src/imports/Components/1.3/PageStack.qml 2017-03-13 10:02:48 +0000
4@@ -219,8 +219,9 @@
5 // used when the Page has a Page.header property set.
6 id: backAction
7 visible: pageStack.depth > 1
8- iconName: "back"
9- text: "Back"
10+ // FIXME: lp#1666607
11+ iconName: Qt.application.layoutDirection == Qt.RightToLeft ? "next": "back"
12+ text: i18n.tr("Back")
13 onTriggered: pageStack.pop()
14 objectName: "pagestack_back_action"
15 }
16
17=== modified file 'src/imports/Components/1.3/ProgressionSlot.qml'
18--- src/imports/Components/1.3/ProgressionSlot.qml 2016-05-25 12:48:10 +0000
19+++ src/imports/Components/1.3/ProgressionSlot.qml 2017-03-13 10:02:48 +0000
20@@ -54,6 +54,7 @@
21 Icon {
22 height: units.gu(2)
23 width: height
24+ // FIXME: lp#1672322
25 name: LayoutMirroring.enabled ? "go-previous" : "go-next"
26 SlotsLayout.position: SlotsLayout.Last
27 }

Subscribers

People subscribed via source and target branches