diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-10-16 22:26:51 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-10-17 10:04:34 +0000 |
commit | 6cb2367f01c1f78d760c1a4d70002cf5a5046396 (patch) | |
tree | 5861bd4fc0ac6b6110fe32ea71646794efbf5593 /tests | |
parent | bd5e078e5b908dc647b5395f9a772074ce206670 (diff) |
ScrollBar: keep active while hovered
Improves usability on desktop, when hover is enabled.
Change-Id: Ib67db80e278a9369da73d81946a9001d432376aa
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/controls/data/tst_scrollbar.qml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_scrollbar.qml b/tests/auto/controls/data/tst_scrollbar.qml index d7bc792d..27d055da 100644 --- a/tests/auto/controls/data/tst_scrollbar.qml +++ b/tests/auto/controls/data/tst_scrollbar.qml @@ -288,4 +288,28 @@ TestCase { container.destroy() } + + function test_hover_data() { + return [ + { tag: "enabled", hoverEnabled: true }, + { tag: "disabled", hoverEnabled: false }, + ] + } + + function test_hover(data) { + var control = scrollBar.createObject(testCase, {hoverEnabled: data.hoverEnabled}) + verify(control) + + compare(control.hovered, false) + + mouseMove(control) + compare(control.hovered, data.hoverEnabled) + compare(control.active, data.hoverEnabled) + + mouseMove(control, -1, -1) + compare(control.hovered, false) + compare(control.active, false) + + control.destroy() + } } |