Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WindowServer: More natural mouse menu navigation #1097

Merged
merged 2 commits into from
Jan 19, 2020

Conversation

shannonbooth
Copy link
Member

Use an imaginary triangle between the top and bottom of the submenu of a
hovered item to determine whether the mouse is moving towards the
submenu. If it is, we do not update the hovered item. This allows the
submenu to stay open, making for much easier menu navigation.

Also add the beginnings of a triangle class which is used to help implement
this feature.

Closes #1094

Servers/WindowServer/WSMenu.cpp Outdated Show resolved Hide resolved
Libraries/LibDraw/Triangle.h Outdated Show resolved Hide resolved
Libraries/LibDraw/Triangle.h Outdated Show resolved Hide resolved
Libraries/LibDraw/Triangle.h Outdated Show resolved Hide resolved
Servers/WindowServer/WSMenu.cpp Outdated Show resolved Hide resolved
Currently the points of a triangle do not need to be initialised in a
certain orientation. Currently, the only real method in the class is
`contains`. However we can continue extending the class if and when we
need more functionality.
Use an imaginary triangle between the top and bottom of the submenu of a
hovered item to determine whether the mouse is moving towards the
submenu. If it is, we do not update the hovered item. This allows the
submenu to stay open, making for much easier menu navigation.

Closes SerenityOS#1094
@awesomekling
Copy link
Collaborator

Nw, looks cool! Thanks for implementing this :)

@awesomekling awesomekling merged commit ead1273 into SerenityOS:master Jan 19, 2020
@shannonbooth shannonbooth deleted the natural-menu branch July 3, 2022 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WindowServer: More natural menu navigation
4 participants