--- 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 $'
! !