#UI_ENHANCEMENT by cg
class: MenuPanel
changed: #handleButtonMotion:atPoint:
if no menu is currently open,
show a submenu immediately.
--- a/MenuPanel.st Tue Mar 05 23:21:10 2019 +0100
+++ b/MenuPanel.st Wed Mar 06 11:42:00 2019 +0100
@@ -3884,8 +3884,9 @@
handleButtonMotion:state atPoint:motionPoint
"open or close the corresponding submenus"
- |menu item translatedPoint containsPoint direction delayTime|
-
+ |menu item translatedPoint containsPoint direction delayTime
+ visibleSubmenu point|
+
false ifTrue:[
state == 0 ifTrue:[
"/ no button currently pressed
@@ -3902,8 +3903,6 @@
"/ current selection
item := items detect:[:el| el visibleSubmenu notNil ] ifNone:nil.
item notNil ifTrue:[
- |visibleSubmenu point|
-
visibleSubmenu := item visibleSubmenu.
visibleSubmenu notNil ifTrue:[
point := self translateMenuPoint:motionPoint toMenu:visibleSubmenu.
@@ -3931,7 +3930,8 @@
(self topMenu activeMenu isNil or:[self topMenu activeMenu == self]) ifTrue:[
"/ no menu open currently
- delayTime := 0.1.
+ "/ delayTime := 0.1.
+ delayTime := 0.
].
].
@@ -3992,7 +3992,7 @@
].
"Modified: / 15-03-2017 / 20:41:07 / stefan"
- "Modified: / 18-02-2019 / 14:07:56 / Claus Gittinger"
+ "Modified: / 06-03-2019 / 11:39:19 / Claus Gittinger"
!
handleButtonPress:button atPoint:aPoint