Merge lp:~stolowski/unity-2d/hud-highlight-fix into lp:unity-2d
Status: | Merged |
---|---|
Approved by: | Albert Astals Cid on 2012-04-04 |
Approved revision: | 1024 |
Merged at revision: | 1039 |
Proposed branch: | lp:~stolowski/unity-2d/hud-highlight-fix |
Merge into: | lp:unity-2d |
Diff against target: |
341 lines (+289/-4) 4 files modified
shell/common/AbstractButton.qml (+4/-2) shell/hud/Hud.qml (+7/-0) shell/hud/ResultItem.qml (+2/-2) tests/hud/hud-search-tests.rb (+276/-0) |
To merge this branch: | bzr merge lp:~stolowski/unity-2d/hud-highlight-fix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Albert Astals Cid (community) | 2012-04-03 | Approve on 2012-04-04 | |
Gerry Boland | 2012-03-28 | Pending | |
Review via email:
|
Commit message
[hud] Highlight one item only in HUD results.
Moving mouse over an item sets currentIndex in the model, rather than relying on "selected" or "hovered" state.
This makes it impossible to have different items highlighted with keyboard and mouse.
Description of the change
[hud] Highlight one item only in HUD results.
Moving mouse over an item sets currentIndex in the model, rather than relying on "selected" or "hovered" state.
This makes it impossible to have different items highlighted with keyboard and mouse.
Albert Astals Cid (aacid) wrote : | # |
- 1022. By Paweł Stołowski on 2012-04-03
-
Fix testability test - use global Y as starting results postion rather then local Y.
Albert Astals Cid (aacid) wrote : | # |
Verify that exactly 5 result items are displayed
should be 6
- 1023. By Paweł Stołowski on 2012-04-03
-
Fixed test comment.
- 1024. By Paweł Stołowski on 2012-04-03
-
Don't reference model.index in ResultItem. Removed hasmouse property and expose mouseOver in AbstractButton, which
is enough.
Albert Astals Cid (aacid) wrote : | # |
Looks good. The forceActiveFocus seems a bit scary, but hopefully we can remove it when fixing 966180
The tests fail here
1) Failure: should_ follow_ mouse(HUD_ Search_ tests) lib/ruby/ vendor_ ruby/tdriver/ verify/ verify. rb:715: in `verify_equal' search- tests.rb: 46:in `item_is_ highlighted' search- tests.rb: 220:in `test_Highlight _should_ follow_ mouse' tsdgeos_ work/unity- 2d/unity- 2d_trunk/ tests/misc/ lib/testhelper. rb:114: in `__send__' tsdgeos_ work/unity- 2d/unity- 2d_trunk/ tests/misc/ lib/testhelper. rb:114: in `run' tsdgeos_ work/unity- 2d/unity- 2d_trunk/ tests/misc/ lib/testhelper. rb:39:in `run']: tests.rb: 46:in `item_is_ highlighted' failed: equal(' true', TIMEOUT, "Result item ##{index+1} should have focus") {
results[ index][ 'activeFocus' ]
test_Highlight_
[/usr/
hud-
hud-
/home/
/home/
/home/
Verification "Result item #2 should have focus" at hud-search-
=> verify_
}
The value was not equal to true. It returned: "false"
2) Failure: Keyboard_ __Mouse_ navigation_ should_ highlight_ only_one_ item(HUD_ Search_ tests) lib/ruby/ vendor_ ruby/tdriver/ verify/ verify. rb:715: in `verify_equal' search- tests.rb: 46:in `item_is_ highlighted' search- tests.rb: 264:in `test_Mixing_ Keyboard_ __Mouse_ navigation_ should_ highlight_ only_one_ item' tsdgeos_ work/unity- 2d/unity- 2d_trunk/ tests/misc/ lib/testhelper. rb:114: in `__send__' tsdgeos_ work/unity- 2d/unity- 2d_trunk/ tests/misc/ lib/testhelper. rb:114: in `run' tsdgeos_ work/unity- 2d/unity- 2d_trunk/ tests/misc/ lib/testhelper. rb:39:in `run']: tests.rb: 46:in `item_is_ highlighted' failed: equal(' true', TIMEOUT, "Result item ##{index+1} should have focus") {
results[ index][ 'activeFocus' ]
test_Mixing_
[/usr/
hud-
hud-
/home/
/home/
/home/
Verification "Result item #2 should have focus" at hud-search-
=> verify_
}
The value was not equal to true. It returned: "false"