*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Tue, 02 Feb 2010 10:54:28 +0100
changeset 4134 3dae6c1fce63
parent 4133 35b38f8dde66
child 4135 82706776fa84
*** empty log message ***
MenuView.st
--- a/MenuView.st	Tue Feb 02 10:53:43 2010 +0100
+++ b/MenuView.st	Tue Feb 02 10:54:28 2010 +0100
@@ -2461,7 +2461,9 @@
 showSubmenu:index
     "show subMenu at index"
 
-    |org mx my menuOrBlock menu|
+    |org mx my menuOrBlock menu rightInset|
+
+    rightInset := 5.
 
     menuOrBlock := subMenus at:index.
     menuOrBlock isNil ifTrue:[^ self].
@@ -2474,7 +2476,7 @@
         menu := menuOrBlock.
     ].
 
-    mx := width - 5.
+    mx := width - rightInset.
     my := self yOfVisibleLine:index.
     "
      need to know the physical screen coordinate,
@@ -2515,8 +2517,8 @@
 
     "/ cg: Jan-2010
     "/ if the submenu covers me, try to show it to the left instead of the right)
-    (menu screenBounds intersects:(self screenBounds insetBy:10)) ifTrue:[
-        menu origin:(org - (width @ 0) - (menu width @ 0) + (10 @ 0)).
+    (menu screenBounds intersects:(self screenBounds insetBy:(rightInset*2))) ifTrue:[
+        menu origin:(org - (width @ 0) - (menu width @ 0) + ((rightInset*2) @ 0)).
         menu makeFullyVisible.
     ].
 
@@ -2936,9 +2938,9 @@
 !MenuView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.163 2010-02-02 09:53:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.164 2010-02-02 09:54:28 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.163 2010-02-02 09:53:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.164 2010-02-02 09:54:28 cg Exp $'
 ! !