Merge lp:~tpeeters/ubuntu-ui-toolkit/actionbar-keyboard into lp:ubuntu-ui-toolkit/staging

Proposed by Tim Peeters
Status: Merged
Approved by: Zsombor Egri
Approved revision: 2137
Merged at revision: 2136
Proposed branch: lp:~tpeeters/ubuntu-ui-toolkit/actionbar-keyboard
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 42 lines (+9/-4)
1 file modified
src/imports/Components/Themes/Ambiance/1.3/ScrollingActionBarStyle.qml (+9/-4)
To merge this branch: bzr merge lp:~tpeeters/ubuntu-ui-toolkit/actionbar-keyboard
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Zsombor Egri Approve
Review via email: mp+307410@code.launchpad.net

Commit message

Enable proper focus handling in the scrolling ActionBar.

Description of the change

Thanks to zsombi's fixes in the UbuntuListView, it is now easy to get the keyboard focus handling to work as specified :).

To test, use tests/unit/visual/tst_actionbar.13.qml (and for manual testing, set the switch at the top to 'scrolling' after launching the qml).

To post a comment you must log in.
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: Needs Fixing (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: Needs Fixing (continuous-integration)
2136. By Tim Peeters

fix highlight

2137. By Tim Peeters

link bug

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)
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)
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
Zsombor Egri (zsombi) wrote :

pretty simple :)

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/Themes/Ambiance/1.3/ScrollingActionBarStyle.qml'
--- src/imports/Components/Themes/Ambiance/1.3/ScrollingActionBarStyle.qml 2016-08-29 19:43:27 +0000
+++ src/imports/Components/Themes/Ambiance/1.3/ScrollingActionBarStyle.qml 2016-10-03 14:08:38 +0000
@@ -47,14 +47,12 @@
47 */47 */
48 // FIXME: This ListItem { AbstractButton { } } construction can be avoided48 // FIXME: This ListItem { AbstractButton { } } construction can be avoided
49 // when StyledItem supports cursor keys navigation, see bug #1573616.49 // when StyledItem supports cursor keys navigation, see bug #1573616.
50 // FIXME: For the first and last item in the list, it is possible to move
51 // the focus inside the ListItem to the AbstractButton, see bug #1590005.
52 // FIXME: Focus can go on disabled item. See bug #1611327.
53 defaultDelegate: ListItem {50 defaultDelegate: ListItem {
54 width: units.gu(4)51 width: units.gu(4)
55 height: actionBarStyle.height52 height: actionBarStyle.height
56 enabled: modelData.enabled53 enabled: modelData.enabled
57 objectName: modelData.objectName + "_button"54 objectName: modelData.objectName + "_button"
55 onClicked: button.trigger()
58 AbstractButton {56 AbstractButton {
59 id: button57 id: button
60 anchors.fill: parent58 anchors.fill: parent
@@ -93,7 +91,7 @@
93 return visibleActionList;91 return visibleActionList;
94 }92 }
9593
96 ListView {94 UbuntuListView {
97 id: actionsListView95 id: actionsListView
98 objectName: "actions_listview"96 objectName: "actions_listview"
99 anchors {97 anchors {
@@ -114,6 +112,13 @@
114 delegate: styledItem.delegate112 delegate: styledItem.delegate
115 model: listViewContainer.visibleActions113 model: listViewContainer.visibleActions
116114
115 highlight: Rectangle {
116 color: theme.palette.focused.background
117 visible: actionsListView.activeFocus
118 width: actionsListView.currentItem.width
119 height: actionsListView.currentItem.height
120 }
121
117 // This gives the correct behavior when scrollButtons.width is122 // This gives the correct behavior when scrollButtons.width is
118 // larger/smaller/equal compared to the width of the delegate.123 // larger/smaller/equal compared to the width of the delegate.
119 onCurrentIndexChanged: positionViewAtIndex(currentIndex, ListView.Contain)124 onCurrentIndexChanged: positionViewAtIndex(currentIndex, ListView.Contain)

Subscribers

People subscribed via source and target branches