Merge lp:~tpeeters/ubuntu-ui-toolkit/sections-keyboard into lp:ubuntu-ui-toolkit/staging
- sections-keyboard
- Merge into staging
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Cris Dywan | ||||
Approved revision: | 1963 | ||||
Merged at revision: | 1959 | ||||
Proposed branch: | lp:~tpeeters/ubuntu-ui-toolkit/sections-keyboard | ||||
Merge into: | lp:ubuntu-ui-toolkit/staging | ||||
Prerequisite: | lp:~tpeeters/ubuntu-ui-toolkit/hor-ListView-nav | ||||
Diff against target: |
158 lines (+38/-18) 4 files modified
src/Ubuntu/Components/1.3/Sections.qml (+1/-0) src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsStyle.qml (+13/-14) src/Ubuntu/Components/plugin/uclistitem.cpp (+2/-0) tests/unit_x11/tst_components/tst_focus.qml (+22/-4) |
||||
To merge this branch: | bzr merge lp:~tpeeters/ubuntu-ui-toolkit/sections-keyboard | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
ubuntu-sdk-build-bot | continuous-integration | Approve | |
Cris Dywan | Approve | ||
Review via email: mp+292587@code.launchpad.net |
Commit message
Sections keyboard and focus handling.
Description of the change
- 1953. By Tim Peeters
-
clean
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1952
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1952
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1952
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1952
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1953
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1953
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1953
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1953
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1953
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Cris Dywan (kalikiana) wrote : | # |
This should be covered by tests/unit_
- 1954. By Tim Peeters
-
hide blue underline when doing keyboard navigation
- 1955. By Tim Peeters
-
hide underline for keyboard-focused selection
Tim Peeters (tpeeters) wrote : | # |
> This should be covered by tests/unit_
> thinks (or possibly a separate one if it makes sense).
The focus is the same as the ListView/ListItem focus for which I added test cases here https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1955
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1955
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Cris Dywan (kalikiana) wrote : | # |
> > This should be covered by tests/unit_
> > thinks (or possibly a separate one if it makes sense).
>
> The focus is the same as the ListView/ListItem focus for which I added test
> cases here https:/
> ListView-
Sure. Still we need a test to assert that it's actually working with Sections. Whether that means that you add it there or to tst_focus is less important, but right now no test fails without this MR right here.
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1955
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1955
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1955
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 1956. By Tim Peeters
-
fix warning in unit test
- 1957. By Tim Peeters
-
update tst_focus
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1957
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1957
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1957
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1957
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1957
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Cris Dywan (kalikiana) wrote : | # |
I notice a visual glitch: there's always white space on the right side of the focus frame. Or in other words it looks like a thin white line. It's not on both sides so I assume it's not expected.
- 1958. By Tim Peeters
-
add FIXME
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1958
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1958
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1958
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1958
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1958
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 1959. By Tim Peeters
-
sync staging
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1959
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1959
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1959
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1959
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1959
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 1960. By Tim Peeters
-
update key focus test
- 1961. By Tim Peeters
-
clean
- 1962. By Tim Peeters
-
clean
- 1963. By Tim Peeters
-
remove unneeded waitForRenderin
g(button)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1960
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1960
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1960
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1960
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1960
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Cris Dywan (kalikiana) wrote : | # |
Thanks for adding the FIXME for the margin and adapting the test case.
Looks rather nice now!
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1963
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1963
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1963
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1963
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1963
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1963
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1963
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1963
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1963
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'src/Ubuntu/Components/1.3/Sections.qml' | |||
2 | --- src/Ubuntu/Components/1.3/Sections.qml 2016-01-06 17:59:06 +0000 | |||
3 | +++ src/Ubuntu/Components/1.3/Sections.qml 2016-04-26 13:22:08 +0000 | |||
4 | @@ -29,6 +29,7 @@ | |||
5 | 29 | StyledItem { | 29 | StyledItem { |
6 | 30 | id: sections | 30 | id: sections |
7 | 31 | styleName: "SectionsStyle" | 31 | styleName: "SectionsStyle" |
8 | 32 | activeFocusOnTab: true | ||
9 | 32 | 33 | ||
10 | 33 | /*! | 34 | /*! |
11 | 34 | List of actions that represent the sections. | 35 | List of actions that represent the sections. |
12 | 35 | 36 | ||
13 | === modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsStyle.qml' | |||
14 | --- src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsStyle.qml 2016-03-02 16:05:40 +0000 | |||
15 | +++ src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsStyle.qml 2016-04-26 13:22:08 +0000 | |||
16 | @@ -89,7 +89,6 @@ | |||
17 | 89 | objectName: "sections_listview" | 89 | objectName: "sections_listview" |
18 | 90 | 90 | ||
19 | 91 | property bool animateContentX: false | 91 | property bool animateContentX: false |
20 | 92 | activeFocusOnTab: false // FIXME: Enable proper focus handling | ||
21 | 93 | 92 | ||
22 | 94 | // Position the selected item correctly. | 93 | // Position the selected item correctly. |
23 | 95 | // For a scrollable ListView, if the item was already fully visible, | 94 | // For a scrollable ListView, if the item was already fully visible, |
24 | @@ -167,6 +166,9 @@ | |||
25 | 167 | x: sectionsListView.currentItem ? sectionsListView.currentItem.x : -width | 166 | x: sectionsListView.currentItem ? sectionsListView.currentItem.x : -width |
26 | 168 | width: sectionsListView.currentItem ? sectionsListView.currentItem.width : 0 | 167 | width: sectionsListView.currentItem ? sectionsListView.currentItem.width : 0 |
27 | 169 | height: sectionsListView.currentItem ? sectionsListView.currentItem.height : 0 | 168 | height: sectionsListView.currentItem ? sectionsListView.currentItem.height : 0 |
28 | 169 | // Hide the highlight underline when the ListItem has the focus frame enabled: | ||
29 | 170 | visible: sectionsListView.currentItem && | ||
30 | 171 | !sectionsListView.currentItem.keyNavigationFocus | ||
31 | 170 | 172 | ||
32 | 171 | Rectangle { | 173 | Rectangle { |
33 | 172 | anchors { | 174 | anchors { |
34 | @@ -180,24 +182,24 @@ | |||
35 | 180 | Behavior on x { UbuntuNumberAnimation {} } | 182 | Behavior on x { UbuntuNumberAnimation {} } |
36 | 181 | } | 183 | } |
37 | 182 | 184 | ||
39 | 183 | delegate: AbstractButton { | 185 | delegate: ListItem { |
40 | 184 | id: sectionButton | 186 | id: sectionButton |
41 | 185 | activeFocusOnTab: false | 187 | activeFocusOnTab: false |
42 | 186 | objectName: "section_button_" + index | 188 | objectName: "section_button_" + index |
43 | 187 | width: label.width + 2 * sectionsStyle.horizontalLabelSpacing | 189 | width: label.width + 2 * sectionsStyle.horizontalLabelSpacing |
44 | 188 | height: sectionsStyle.height | 190 | height: sectionsStyle.height |
45 | 191 | // No need to clip | ||
46 | 192 | contentItem.clip: false | ||
47 | 193 | |||
48 | 189 | property bool selected: index === styledItem.selectedIndex | 194 | property bool selected: index === styledItem.selectedIndex |
49 | 190 | onClicked: { | 195 | onClicked: { |
50 | 191 | styledItem.selectedIndex = index; | 196 | styledItem.selectedIndex = index; |
51 | 192 | sectionsListView.forceActiveFocus(); | 197 | sectionsListView.forceActiveFocus(); |
52 | 193 | } | 198 | } |
53 | 194 | 199 | ||
60 | 195 | // Background pressed highlight | 200 | // FIXME: This line may be removed when bug #1573215 is fixed and |
61 | 196 | Rectangle { | 201 | // ListItems in a horizontal ListView don't show the divider by default |
62 | 197 | visible: parent.pressed | 202 | divider.visible: false |
57 | 198 | anchors.fill: parent | ||
58 | 199 | color: sectionsStyle.pressedBackgroundColor | ||
59 | 200 | } | ||
63 | 201 | 203 | ||
64 | 202 | // Section title | 204 | // Section title |
65 | 203 | Label { | 205 | Label { |
66 | @@ -207,12 +209,7 @@ | |||
67 | 207 | text: modelData.hasOwnProperty("text") ? modelData.text : modelData | 209 | text: modelData.hasOwnProperty("text") ? modelData.text : modelData |
68 | 208 | textSize: sectionsStyle.textSize | 210 | textSize: sectionsStyle.textSize |
69 | 209 | font.weight: Font.Light | 211 | font.weight: Font.Light |
76 | 210 | anchors { | 212 | anchors.centerIn: parent |
71 | 211 | baseline: underline.bottom | ||
72 | 212 | baselineOffset: sectionsStyle.height < units.gu(4) ? -units.gu(1) : -units.gu(2) | ||
73 | 213 | horizontalCenter: parent.horizontalCenter | ||
74 | 214 | } | ||
75 | 215 | |||
77 | 216 | color: sectionButton.selected ? | 213 | color: sectionButton.selected ? |
78 | 217 | sectionsStyle.selectedSectionColor : | 214 | sectionsStyle.selectedSectionColor : |
79 | 218 | sectionsStyle.sectionColor | 215 | sectionsStyle.sectionColor |
80 | @@ -232,6 +229,8 @@ | |||
81 | 232 | } | 229 | } |
82 | 233 | height: sectionsStyle.underlineHeight | 230 | height: sectionsStyle.underlineHeight |
83 | 234 | color: sectionsStyle.underlineColor | 231 | color: sectionsStyle.underlineColor |
84 | 232 | // Don't cover the focus frame: | ||
85 | 233 | visible: !sectionButton.keyNavigationFocus | ||
86 | 235 | } | 234 | } |
87 | 236 | } | 235 | } |
88 | 237 | 236 | ||
89 | 238 | 237 | ||
90 | === modified file 'src/Ubuntu/Components/plugin/uclistitem.cpp' | |||
91 | --- src/Ubuntu/Components/plugin/uclistitem.cpp 2016-04-20 15:00:27 +0000 | |||
92 | +++ src/Ubuntu/Components/plugin/uclistitem.cpp 2016-04-26 13:22:08 +0000 | |||
93 | @@ -1140,6 +1140,8 @@ | |||
94 | 1140 | updateNode = true; | 1140 | updateNode = true; |
95 | 1141 | } | 1141 | } |
96 | 1142 | QRectF rect(boundingRect()); | 1142 | QRectF rect(boundingRect()); |
97 | 1143 | // FIXME: The 1dp margin is here so that part of the focus frame | ||
98 | 1144 | // is not hidden by the APL divider. See bug #1575060. | ||
99 | 1143 | rect -= QMarginsF(0, 0, UCUnits::instance()->dp(1), 0); | 1145 | rect -= QMarginsF(0, 0, UCUnits::instance()->dp(1), 0); |
100 | 1144 | d->divider->setOpacity(paintFocus ? 0.0 : 1.0); | 1146 | d->divider->setOpacity(paintFocus ? 0.0 : 1.0); |
101 | 1145 | rectNode->setRect(rect); | 1147 | rectNode->setRect(rect); |
102 | 1146 | 1148 | ||
103 | === modified file 'tests/unit_x11/tst_components/tst_focus.qml' | |||
104 | --- tests/unit_x11/tst_components/tst_focus.qml 2016-04-26 05:33:41 +0000 | |||
105 | +++ tests/unit_x11/tst_components/tst_focus.qml 2016-04-26 13:22:08 +0000 | |||
106 | @@ -85,6 +85,14 @@ | |||
107 | 85 | Slider { | 85 | Slider { |
108 | 86 | id: slider | 86 | id: slider |
109 | 87 | } | 87 | } |
110 | 88 | Sections { | ||
111 | 89 | id: sections | ||
112 | 90 | actions: [ | ||
113 | 91 | Action { text: "Section 1" }, | ||
114 | 92 | Action { text: "Section 2" }, | ||
115 | 93 | Action { text: "Section 3" } | ||
116 | 94 | ] | ||
117 | 95 | } | ||
118 | 88 | Button { | 96 | Button { |
119 | 89 | id: dummy2 | 97 | id: dummy2 |
120 | 90 | } | 98 | } |
121 | @@ -239,8 +247,12 @@ | |||
122 | 239 | {tag: "CheckBox", from: switchbox, to: checkbox, key: Qt.Key_Backtab}, | 247 | {tag: "CheckBox", from: switchbox, to: checkbox, key: Qt.Key_Backtab}, |
123 | 240 | {tag: "Switch", from: switchbox, to: slider, key: Qt.Key_Tab}, | 248 | {tag: "Switch", from: switchbox, to: slider, key: Qt.Key_Tab}, |
124 | 241 | {tag: "Switch(back)", from: slider, to: switchbox, key: Qt.Key_Backtab}, | 249 | {tag: "Switch(back)", from: slider, to: switchbox, key: Qt.Key_Backtab}, |
127 | 242 | {tag: "Slider", from: slider, to: dummy2, key: Qt.Key_Tab}, | 250 | {tag: "Slider", from: slider, to: sections, key: Qt.Key_Tab, keyFocusItem: "section_button_0"}, |
128 | 243 | {tag: "Slider(back)", from: dummy2, to: slider, key: Qt.Key_Backtab}, | 251 | {tag: "Slider(back)", from: sections, to: slider, key: Qt.Key_Backtab}, |
129 | 252 | // NOTE: Navigation INSIDE the sections using the arrow keys is tested | ||
130 | 253 | // in tst_sections.qml. | ||
131 | 254 | {tag: "Sections", from: sections, to: dummy2, key: Qt.Key_Tab}, | ||
132 | 255 | {tag: "Sections(back)", from:dummy2, to: sections, key: Qt.Key_Backtab, keyFocusItem: "section_button_0"}, | ||
133 | 244 | /* FIXME: Figure out how to test ActionBar delegate focus | 256 | /* FIXME: Figure out how to test ActionBar delegate focus |
134 | 245 | {tag: "ActionBar", from: 'actionBarShare_button', to: picker, key: Qt.Key_Tab}, | 257 | {tag: "ActionBar", from: 'actionBarShare_button', to: picker, key: Qt.Key_Tab}, |
135 | 246 | {tag: "ActionBar(back)", from: picker, to: 'actionBarShare_button', key: Qt.Key_Backtab}, | 258 | {tag: "ActionBar(back)", from: picker, to: 'actionBarShare_button', key: Qt.Key_Backtab}, |
136 | @@ -267,7 +279,14 @@ | |||
137 | 267 | } else { | 279 | } else { |
138 | 268 | verify(data.to.activeFocusOnTab, "Target doesn't take keyboard focus"); | 280 | verify(data.to.activeFocusOnTab, "Target doesn't take keyboard focus"); |
139 | 269 | keyClick(data.key); | 281 | keyClick(data.key); |
141 | 270 | verify(data.to.keyNavigationFocus, "Target doesn't have keyNavigationFocus"); | 282 | |
142 | 283 | if (data.keyFocusItem) { | ||
143 | 284 | var child = findChild(data.to, data.keyFocusItem); | ||
144 | 285 | verify(child, "Target does not have child with objectName "+data.keyFocusItem); | ||
145 | 286 | verify(child.keyNavigationFocus, "Target child does not have keyNavigationFocus"); | ||
146 | 287 | } else { | ||
147 | 288 | verify(data.to.keyNavigationFocus, "Target does not have keyNavigationFocus"); | ||
148 | 289 | } | ||
149 | 271 | } | 290 | } |
150 | 272 | waitForRendering(data.to, 500); | 291 | waitForRendering(data.to, 500); |
151 | 273 | verify(!data.from.activeFocus, "Source component still keeps focus"); | 292 | verify(!data.from.activeFocus, "Source component still keeps focus"); |
152 | @@ -410,7 +429,6 @@ | |||
153 | 410 | buttonTriggerSpy.target = button; | 429 | buttonTriggerSpy.target = button; |
154 | 411 | button.forceActiveFocus(); | 430 | button.forceActiveFocus(); |
155 | 412 | keyClick(data.key); | 431 | keyClick(data.key); |
156 | 413 | waitForRendering(button); | ||
157 | 414 | buttonTriggerSpy.wait(); | 432 | buttonTriggerSpy.wait(); |
158 | 415 | } | 433 | } |
159 | 416 | 434 |
PASSED: Continuous integration, rev:1952 /jenkins. ubuntu. com/ubuntu- sdk/job/ ubuntu- ui-toolkit- ci-amd64- devel/511/ /jenkins. ubuntu. com/ubuntu- sdk/job/ generic- update- mp/2843/ console
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/ubuntu- sdk/job/ ubuntu- ui-toolkit- ci-amd64- devel/511/ rebuild
https:/