--- a/Scroller.st Sun Oct 26 21:09:17 2008 +0100
+++ b/Scroller.st Sun Oct 26 21:10:10 2008 +0100
@@ -2608,24 +2608,28 @@
|defExt w h|
- "/ 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
].
defExt := self class defaultExtent.
orientation == #vertical ifTrue:[
- h := defExt y.
- (w := DefaultVScrollerWidth) isNil ifTrue:[
- w := (device horizontalPixelPerMillimeter asFloat * 5) rounded
- ]
+ h := defExt y.
+ (w := DefaultVScrollerWidth) isNil ifTrue:[
+ w := (device horizontalPixelPerMillimeter asFloat * 5) rounded
+ ]
] ifFalse:[
- w := defExt x.
- (h := DefaultHScrollerHeight) isNil ifTrue:[
- h := (device verticalPixelPerMillimeter asFloat * 5) rounded
- ]
+ w := defExt x.
+ (h := DefaultHScrollerHeight) isNil ifTrue:[
+ h := (device verticalPixelPerMillimeter asFloat * 5) rounded
+ ]
].
preferredExtent := w @ h.
@@ -2666,5 +2670,5 @@
!Scroller class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.187 2008-07-18 09:43:39 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.188 2008-10-26 20:10:10 stefan Exp $'
! !