PullDownMenu.st
changeset 3 9d7eefb5e69f
parent 0 e6a541c1c0eb
child 5 7b4fb1b170e5
--- a/PullDownMenu.st	Wed Oct 13 02:01:27 1993 +0100
+++ b/PullDownMenu.st	Wed Oct 13 02:04:14 1993 +0100
@@ -25,8 +25,15 @@
 COPYRIGHT (c) 1989-93 by Claus Gittinger
              All Rights Reserved
 
-%W% %E%
+$Header: /cvs/stx/stx/libwidg/PullDownMenu.st,v 1.2 1993-10-13 01:03:09 claus Exp $
+
+written summer 89 by claus
+'!
 
+!PullDownMenu class methodsFor:'documentation'!
+
+documentation
+"
 PullDown menu provides the top (always visible) part of these menus. It controls
 display of its menus, which become visible when one of the PullDownMenus entries is pressed.
 
@@ -41,9 +48,8 @@
 bgColor                 <Color>         color to draw passive menu-titles
 activeFgColor           <Color>         color to draw activated menu-titles
 activeBgColor           <Color>         color to draw activated menu-titles
-
-written summer 89 by claus
-'!
+"
+! !
 
 !PullDownMenu class methodsFor:'instance creation'!
 
@@ -60,7 +66,7 @@
 
     font := font on:device.
     self origin:(0.0 @ 0.0)
-         extent:(1.0 @ (font height + (font descent * 2))).
+         extent:(1.0 @ (font height + (font descent * 2)  + topMargin)).
 !
 
 initStyle
@@ -149,7 +155,8 @@
 font:aFont
     "adjust menu-origins when font changes"
 
-    super font:aFont.
+    super font:(aFont on:device).
+    self height:(font height + (font descent * 2)).
     self setMenuOrigins
 !
 
@@ -269,7 +276,7 @@
 drawTitle:string x:x selected:selected
     |yText w|
 
-    yText := ((height - (font height)) // 2) + (font ascent) + topMargin.
+    yText := ((height - (font height)) // 2) + (font ascent) "+ topMargin".
     w := font widthOf:string.
     selected ifTrue:[
         self paint:activeBgColor