ScrollBar.st
changeset 139 7dd008efa3d8
parent 133 e58c7c979f33
child 140 1f3188eb337c
--- a/ScrollBar.st	Thu Aug 10 20:48:00 1995 +0200
+++ b/ScrollBar.st	Fri Aug 11 18:07:46 1995 +0200
@@ -24,7 +24,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libwidg/ScrollBar.st,v 1.15 1995-07-23 03:02:27 claus Exp $
+$Header: /cvs/stx/stx/libwidg/ScrollBar.st,v 1.16 1995-08-11 16:07:46 claus Exp $
 '!
 
 !ScrollBar class methodsFor:'documentation'!
@@ -45,7 +45,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libwidg/ScrollBar.st,v 1.15 1995-07-23 03:02:27 claus Exp $
+$Header: /cvs/stx/stx/libwidg/ScrollBar.st,v 1.16 1995-08-11 16:07:46 claus Exp $
 "
 !
 
@@ -269,19 +269,23 @@
 !ScrollBar methodsFor:'private'!
 
 enableDisableButtons
-    |e1 e2|
+    |e1 e2 th to|
 
     (styleSheet at:'scrollBarDisableButtons' default:false) ifFalse:[^ self].
 
     e1 := e2 := true.
-    thumb thumbHeight >= 99.99999 ifTrue:[
+    (th := thumb thumbHeight) isNil ifTrue:[th := 0].
+"/    thumb thumbHeight >= 99.99999 ifTrue:[
+    (th >= (thumb stop)) ifTrue:[
 	e1 := false.
 	e2 := false
     ] ifFalse:[
-	thumb thumbOrigin <= 0.00001 ifTrue:[
+"/        ((to := thumb thumbOrigin) <= 0.00001) ifTrue:[
+	((to := thumb thumbOrigin) <= thumb start) ifTrue:[
 	    e1 := false
 	] ifFalse:[
-	    (thumb thumbOrigin + thumb thumbHeight) >= 99.99999 ifTrue:[
+"/            (to + th) >= 99.99999 ifTrue:[
+	    (to + th) >= thumb stop ifTrue:[
 		e2 := false
 	    ]
 	]