changed #preferredExtent - use explicitExtent instvar
authorStefan Vogel <sv@exept.de>
Sun, 26 Oct 2008 21:16:49 +0100
changeset 3772 f0defaed2ddb
parent 3771 4233b9ff2cb6
child 3773 4fea6dc2496c
changed #preferredExtent - use explicitExtent instvar
PullDownMenu.st
--- a/PullDownMenu.st	Sun Oct 26 21:15:50 2008 +0100
+++ b/PullDownMenu.st	Sun Oct 26 21:16:49 2008 +0100
@@ -1741,20 +1741,24 @@
 
     |w hMax|
 
-    "/ If I have an explicit preferredExtent ..
+    "/ If I have an explicit preferredExtent..
+    explicitExtent notNil ifTrue:[
+        ^ explicitExtent
+    ].
 
+    "/ If I have a cached preferredExtent value..
     preferredExtent notNil ifTrue:[
-	^ preferredExtent
+        ^ preferredExtent
     ].
 
     w := self titleLenUpTo:(titles size + 1).
     hMax := font height + (font descent * 2).
     titles notNil ifTrue:[
-	titles do:[:aStringOrImage |
-	    aStringOrImage isString ifFalse:[
-		hMax := hMax max:(aStringOrImage heightOn:self)
-	    ]
-	]
+        titles do:[:aStringOrImage |
+            aStringOrImage isString ifFalse:[
+                hMax := hMax max:(aStringOrImage heightOn:self)
+            ]
+        ]
     ].
         
     ^ w @ (hMax + (margin*2) + ((onLevel abs max:offLevel abs)*2) "+ topMargin").
@@ -1804,5 +1808,5 @@
 !PullDownMenu class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/PullDownMenu.st,v 1.101 2008-05-30 12:25:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/PullDownMenu.st,v 1.102 2008-10-26 20:16:49 stefan Exp $'
 ! !