diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-06-06 15:58:36 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-06-07 09:56:27 +0000 |
commit | 0d59bff8929299ce5e2d9ec957055854a59c6cd6 (patch) | |
tree | 34e0c56e2af911bab3e5098e022af2d79d6eae8b /src/imports/controls/material | |
parent | f37397ba3125e1ab5dc940270d90844a6010224f (diff) |
QQuickMenu: update the highlighted item on mouse hover
This is the expected behavior on desktop.
NOTE: It must be possible to mix mouse hover highlighting, and keyboard
navigation in the way that keyboard navigation must seamlessly continue
from the item that was previously mouse highlighted. Furthermore, there
should be only one item highlighted at a time. In order to be able to
respect keyboard navigation while another item is hovered and vice versa,
the visual highlight should be bound to MenuItem::highlighted instead of
Control::activeFocus or Control::hovered.
[ChangeLog][Controls][MenuItem] Menu has been fixed to highlight its
items while key navigating and mouse hovering to ensure seamless item
highlight between mouse hover and key navigation. In order to provide
appropriate highlighting that works for key navigation and mouse hover,
styles should bind their visual highlight to MenuItem::highlighted
instead of Control::activeFocus or Control::hovered.
Change-Id: I70cad5a5b441f2616d1ce2166e97974dc1ae063f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/material')
-rw-r--r-- | src/imports/controls/material/MenuItem.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/controls/material/MenuItem.qml b/src/imports/controls/material/MenuItem.qml index b91718b6..a5bf8a54 100644 --- a/src/imports/controls/material/MenuItem.qml +++ b/src/imports/controls/material/MenuItem.qml @@ -94,7 +94,7 @@ T.MenuItem { clip: visible pressed: control.pressed anchor: control - active: control.down || control.visualFocus || control.hovered + active: control.down || control.highlighted color: control.Material.rippleColor } } |