--- a/Scroller.st Sat Oct 24 16:58:51 2009 +0200
+++ b/Scroller.st Sat Oct 24 18:01:04 2009 +0200
@@ -1212,7 +1212,7 @@
|handleX handleY l t lvl
w "{ Class: SmallInteger }"
h "{ Class: SmallInteger }"
- clr clr2 xpStyle|
+ clr clr2 xpStyle n|
(thumbHeight >= 100) ifTrue:[^ self].
thumbFrame isNil ifTrue:[^ self].
@@ -1227,15 +1227,55 @@
clr := entered ifTrue:[thumbEnteredColor] ifFalse:[thumbColor].
(scrolling and:[thumbActiveColor notNil]) ifTrue:[clr := thumbActiveColor].
- self paint:clr.
- (xpStyle and:[self isMiniScroller not]) ifTrue:[
+ (styleSheet at:#'scroller.vista3DStyle' default:false) ifTrue:[
+ "/ 243 242 240 236 234 233 215 211 207 205 200 192 206
(orientation == #vertical) ifTrue:[
- self fillRectangleX:l y:t+1 width:w-2 height:h-4.
+ n := w
] ifFalse:[
- self fillRectangleX:l+1 y:t width:w-4 height:h-2.
- ]
+ n := h
+ ].
+ (1 to:n-2) do:[:i |
+ |m|
+
+ i <= (n//2) ifTrue:[
+ i <= (n//4) ifTrue:[
+ m := 3.
+ ] ifFalse:[
+ i <= (n//3) ifTrue:[
+ m := 2.5.
+ ] ifFalse:[
+ m := 2.
+ ].
+ ].
+ ] ifFalse:[
+ i > (n*3//4) ifTrue:[
+ m := 0.
+ ] ifFalse:[
+ i > (n*2//3) ifTrue:[
+ m := 0.4
+ ] ifFalse:[
+ m := 0.8.
+ ].
+ ].
+ ].
+ self paint:(Color white mixed:m with:clr).
+ (orientation == #vertical) ifTrue:[
+ self displayLineFromX:(l+i-1) y:t+1 toX:(l+i-1) y:(t+h-2)
+ ] ifFalse:[
+ self displayLineFromX:(l+1) y:(t+i-1) toX:(l+w-2) y:(t+i-1)
+ ].
+ ].
] ifFalse:[
- self fillRectangleX:l y:t width:w height:h.
+ self paint:clr.
+ (xpStyle and:[self isMiniScroller not]) ifTrue:[
+ (orientation == #vertical) ifTrue:[
+ self fillRectangleX:l y:t+1 width:w-2 height:h-4.
+ ] ifFalse:[
+ self fillRectangleX:l+1 y:t width:w-4 height:h-2.
+ ]
+ ] ifFalse:[
+ self fillRectangleX:l y:t width:w height:h.
+ ].
].
lvl := thumbLevel.
@@ -2670,9 +2710,9 @@
!Scroller class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.190 2009-10-23 15:21:44 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.191 2009-10-24 16:01:04 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.190 2009-10-23 15:21:44 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.191 2009-10-24 16:01:04 cg Exp $'
! !