#UI_ENHANCEMENT by cg
authorClaus Gittinger <cg@exept.de>
Wed, 08 May 2019 10:45:34 +0200
changeset 6050 63d0cca05196
parent 6049 d064dc363de8
child 6051 d7240d502ea7
#UI_ENHANCEMENT by cg class: MenuPanel comment/format in: #pointerEntersItem: changed: #handleButtonMotion:atPoint:
MenuPanel.st
--- a/MenuPanel.st	Tue May 07 19:06:57 2019 +0200
+++ b/MenuPanel.st	Wed May 08 10:45:34 2019 +0200
@@ -3905,8 +3905,8 @@
         
     containsPoint := self containsPoint:motionPoint.
     (containsPoint not and:[items notEmptyOrNil]) ifTrue:[
-        "/ check if there is still open a menu which is not assigned to the
-        "/ current selection
+        "/ check if there is still an open menu,
+        "/ which is not assigned to (i.e. a submenu of) the current selection
         item := items detect:[:el| el visibleSubmenu notNil ] ifNone:nil.
         item notNil ifTrue:[
             visibleSubmenu := item visibleSubmenu.
@@ -3933,11 +3933,15 @@
         "/ motionPoint x < (self width//3) ifTrue:[
         "/    delayTime := delayTime / 2.
         "/ ]. 
-        
-        (self topMenu activeMenu isNil or:[self topMenu activeMenu == self]) ifTrue:[
-            "/ no menu open currently
-            "/ delayTime := 0.1.
-            delayTime := 0.
+
+        "/ bad idea: popped up menu might overlap the next item.
+        "/ (try lancher-windows and move down...)
+        false ifTrue:[
+            (self topMenu activeMenu isNil or:[self topMenu activeMenu == self]) ifTrue:[
+                "/ no menu open currently
+                "/ delayTime := 0.1.
+                delayTime := 0.
+            ].
         ].
     ].
 
@@ -3998,7 +4002,7 @@
     ].
 
     "Modified: / 15-03-2017 / 20:41:07 / stefan"
-    "Modified: / 06-03-2019 / 11:39:19 / Claus Gittinger"
+    "Modified (comment): / 08-05-2019 / 10:44:03 / Claus Gittinger"
 !
 
 handleButtonPress:button atPoint:aPoint
@@ -4330,8 +4334,8 @@
 !
 
 pointerEntersItem:anItemOrNil
-    "the pointer moves over an item or nil; restore the old item and
-     redraw the new item highlighted."
+    "the pointer moves over an item or nil; 
+     restore the old item and redraw the new item highlighted."
 
     |oldItem newItem|
 
@@ -4372,6 +4376,7 @@
     ].
 
     "Modified: / 23-12-2018 / 00:31:33 / Claus Gittinger"
+    "Modified (comment): / 08-05-2019 / 10:45:19 / Claus Gittinger"
 !
 
 processHideMenuEvent:ev