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
=== 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 @@
219 // used when the Page has a Page.header property set.219 // used when the Page has a Page.header property set.
220 id: backAction220 id: backAction
221 visible: pageStack.depth > 1221 visible: pageStack.depth > 1
222 iconName: "back"222 // FIXME: lp#1666607
223 text: "Back"223 iconName: Qt.application.layoutDirection == Qt.RightToLeft ? "next": "back"
224 text: i18n.tr("Back")
224 onTriggered: pageStack.pop()225 onTriggered: pageStack.pop()
225 objectName: "pagestack_back_action"226 objectName: "pagestack_back_action"
226 }227 }
227228
=== 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 @@
54Icon {54Icon {
55 height: units.gu(2)55 height: units.gu(2)
56 width: height56 width: height
57 // FIXME: lp#1672322
57 name: LayoutMirroring.enabled ? "go-previous" : "go-next"58 name: LayoutMirroring.enabled ? "go-previous" : "go-next"
58 SlotsLayout.position: SlotsLayout.Last59 SlotsLayout.position: SlotsLayout.Last
59}60}

Subscribers

People subscribed via source and target branches