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

Menu applet/Shell Toolkit: Add a polygon widget class and implement it in the menu applet #1787

Closed
wants to merge 10 commits into from

Conversation

mtwebster
Copy link
Member

This is to prevent inadvertant category changes when moving the mouse
over to the applications box.

See issue #1775

The polygon is drawn and acts like a mask, preventing selection changing while
your mouse movement is towards the app box.

It is normally invisible but can be made visible to help debugging.

https://dl.dropbox.com/u/8201170/cinnamon-20130311-1.webm

@mtwebster
Copy link
Member Author

I'm fairly satisfied with this now. I've turned off debugging mode (easily turned back on if you want) - seeing the mask actually influences how you move the mouse it turns out - it works quite well when you're not thinking about it though.

Sluggish on my virtual machine here, but that's normal... I'll try again later on my laptop and see how it works. Performance was fine in earlier iterations of it.

@mtwebster
Copy link
Member Author

New video, improved behavior:

https://dl.dropbox.com/u/8201170/cinnamon-20130312-1.webm

@dalcde
Copy link
Contributor

dalcde commented Mar 12, 2013

Looks cool :)

@Topperfalkon
Copy link

That's a massive improvement in my opinion. I look forward to trying that out next time I jump on Linux Mint.

@Lusito
Copy link
Contributor

Lusito commented Mar 13, 2013

Been tinkering with this as well, ever since 1775, but I don't really see the point in the polygon ui element. Can you explain why you need this instead of a triangle ?

@gauravjuvekar
Copy link
Contributor

@Lusito A triangle is a polygon.
Would make using other shapes possible rather than a triangle eg for a larger area perhaps enabled through some accessibility setting.

@mtwebster
Copy link
Member Author

I'm not using a triangle because I want to encompass the height of the selected category in my mask, not just a point leading from the mouse position.

Technically it's a quadrilateral - a rectangle with uneven sides/angles.

@Lusito
Copy link
Contributor

Lusito commented Mar 13, 2013

or a triangle with a cut off tip. But I don't see the point of adding the height of the selected category, since when you are still on the category, there will be no changes anyhow.
(I' assuming the left part of the polygon is aligned with the button top/bottom position, at least that's how it looks in the video.)

@mtwebster
Copy link
Member Author

Couple reasons - it gives a larger masking envelope, for the user, and it means less redraws of the polygon from simple up/down movement.

It's really an inexact thing - I'll definitely look into having an area smaller than the button height, since it improves category navigation, but I don't think having it come to a point would work out that well.

@mtwebster
Copy link
Member Author

@Lusito it did seem to improve responsiveness making it more 'pointy' - didn't appear to affect performance much, I think it's just about perfect now

@VolMi
Copy link

VolMi commented Mar 18, 2013

I love you. ;-)

Really, it's great to see you solving this so elegantly. Thank you very much!

@mtwebster mtwebster mentioned this pull request Apr 10, 2013
…t in

the menu applet to prevent inadvertant category changes when moving the mouse
over to the applications box.

The polygon is drawn and acts like a mask, preventing selection changing while
your mouse movement is towards the app box.

It is normally invisible but can be made visible to help debugging
…when

debug mode is off - you're not 'trying' to follow the shape.
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.

6 participants