Floating menu expansion – avoid screen edges

When setting the Expansion Direction on a floating menu, would it be possible to add a check box option to avoid screen edges?

For example I have a floating menu which usually stays at the top-centre of the screen and expands downwards, but sometimes I need to move it around to the bottom or side of the screen. When it is placed at the bottom/side but expanding downwards it of course just expands off the edge of the screen.

It would be great to have an option so that if it's going to hit a screen edge, it will automatically be limited by the screen edge and expand into place accordingly. When unhovering, the shrunk version would remain in the same position it was before expanding.


Separate but related idea – Expansion Directions are always from an edge/corner of the menu – how about the option to expand from the centre outwards in all directions?

ah good point I once worked on this but didn't finish it, then forgot about it.

Expanding from center should also be possible, I'll check!

1 Like

On further thought, maybe the "don't expand off screen edges" could be a general option for a floating menu (not specific to the 'expanding' function).

That is to say, any floating menu can have "don't move/appear past screen edge" switched on, so that the left/right/bottom screen edges behave like the top edge – a floating menu can't move past it and will just hit it and stop.

The point of this would be that if someone is moving their floating menu around they don't have to be careful when positioning it next to a screen edge – it will just stop when hitting the edge.