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
1=== modified file 'src/imports/Components/Themes/Ambiance/1.3/ScrollingActionBarStyle.qml'
2--- src/imports/Components/Themes/Ambiance/1.3/ScrollingActionBarStyle.qml 2016-08-29 19:43:27 +0000
3+++ src/imports/Components/Themes/Ambiance/1.3/ScrollingActionBarStyle.qml 2016-10-03 14:08:38 +0000
4@@ -47,14 +47,12 @@
5 */
6 // FIXME: This ListItem { AbstractButton { } } construction can be avoided
7 // when StyledItem supports cursor keys navigation, see bug #1573616.
8- // FIXME: For the first and last item in the list, it is possible to move
9- // the focus inside the ListItem to the AbstractButton, see bug #1590005.
10- // FIXME: Focus can go on disabled item. See bug #1611327.
11 defaultDelegate: ListItem {
12 width: units.gu(4)
13 height: actionBarStyle.height
14 enabled: modelData.enabled
15 objectName: modelData.objectName + "_button"
16+ onClicked: button.trigger()
17 AbstractButton {
18 id: button
19 anchors.fill: parent
20@@ -93,7 +91,7 @@
21 return visibleActionList;
22 }
23
24- ListView {
25+ UbuntuListView {
26 id: actionsListView
27 objectName: "actions_listview"
28 anchors {
29@@ -114,6 +112,13 @@
30 delegate: styledItem.delegate
31 model: listViewContainer.visibleActions
32
33+ highlight: Rectangle {
34+ color: theme.palette.focused.background
35+ visible: actionsListView.activeFocus
36+ width: actionsListView.currentItem.width
37+ height: actionsListView.currentItem.height
38+ }
39+
40 // This gives the correct behavior when scrollButtons.width is
41 // larger/smaller/equal compared to the width of the delegate.
42 onCurrentIndexChanged: positionViewAtIndex(currentIndex, ListView.Contain)

Subscribers

People subscribed via source and target branches