When a menu has sub-menus they are placed to the right of the parent but slid back a little left so the overlap and the pointer travelling rightwards to the new menu will not suddenly trigger mouseleave vents and close the menu tree unexpectedly. If however the parent menu is nearly at the right side of the screen, the sub-menu has to be placed to the left. So far as I can work out the current code gets this slightly wrong and places it too far left so that the mouse does indeed tend to send a mouseleave event etc. Result is very annoying for users since they can’t select what they wanted to.
The culprit appears to me to be in the MenuMorph>popUpAdjacentTo:forHand:from: method where ‘leftPoint’ is calculated. We subtract the layoutinset and borderwidth as well as the width; whereas I’m fairly sure it ought to be *add* the layoutinset and borderwidth but subtract the width. Certainly it seems to provide a better visual layout.
I can’t see any cases that get broken by such a change but since it’s hard to be sure I’ll just commit this to the inbox for a couple of days before trunking it.
tim
--
tim Rowledge;
[hidden email];
http://www.rowledge.org/timPeople who deal with bits should expect to get bitten.