--- a/Scroller.st Wed Aug 18 16:31:38 1999 +0200
+++ b/Scroller.st Wed Aug 18 16:39:18 1999 +0200
@@ -557,7 +557,7 @@
] ifFalse:[
nBg := DefaultViewBackground
].
- nBg := nBg on:device.
+ nBg := nBg onDevice:device.
nBg ~~ viewBackground ifTrue:[
self viewBackground:nBg.
shown ifTrue:[self clear].
@@ -785,51 +785,51 @@
newHeight := heightNumber / (range abs / 100).
(newHeight > 100) ifTrue:[
- realNewHeight := 100
+ realNewHeight := 100
] ifFalse:[
- realNewHeight := newHeight
+ realNewHeight := newHeight
].
((newOrigin + realNewHeight) > 100) ifTrue:[
- realNewOrigin := 100 - realNewHeight
+ realNewOrigin := 100 - realNewHeight
] ifFalse: [
- realNewOrigin := newOrigin
+ realNewOrigin := newOrigin
].
(realNewOrigin < 0) ifTrue: [
- realNewOrigin := 0
+ realNewOrigin := 0
].
changed := (realNewHeight ~= thumbHeight) or:[realNewOrigin ~= thumbOrigin].
(changed or:[thumbFrame isNil]) ifTrue:[
- old := self absFromPercent:thumbOrigin.
- new := self absFromPercent:realNewOrigin.
- changed := old ~~ new.
- changed ifFalse:[
- old := self absFromPercent:thumbHeight.
- new := self absFromPercent:realNewHeight.
- changed := (old ~~ new)
- ].
- (changed or:[thumbFrame isNil]) ifTrue:[
- thumbOrigin := realNewOrigin.
- thumbHeight := realNewHeight.
-
- (DefaultFullViewBackground notNil
- and:[DefaultViewBackground notNil
- and:[DefaultFullViewBackground ~~ DefaultViewBackground]]) ifTrue:[
- realNewHeight >= 100 ifTrue:[
- nBg := DefaultFullViewBackground.
- ] ifFalse:[
- nBg := DefaultViewBackground
- ].
- nBg := nBg on:device.
- nBg ~~ viewBackground ifTrue:[
- self viewBackground:nBg.
- shown ifTrue:[self clear].
- ]
- ].
-
- shown ifTrue:[
- thumbFrame := nil.
- self invalidate.
+ old := self absFromPercent:thumbOrigin.
+ new := self absFromPercent:realNewOrigin.
+ changed := old ~~ new.
+ changed ifFalse:[
+ old := self absFromPercent:thumbHeight.
+ new := self absFromPercent:realNewHeight.
+ changed := (old ~~ new)
+ ].
+ (changed or:[thumbFrame isNil]) ifTrue:[
+ thumbOrigin := realNewOrigin.
+ thumbHeight := realNewHeight.
+
+ (DefaultFullViewBackground notNil
+ and:[DefaultViewBackground notNil
+ and:[DefaultFullViewBackground ~~ DefaultViewBackground]]) ifTrue:[
+ realNewHeight >= 100 ifTrue:[
+ nBg := DefaultFullViewBackground.
+ ] ifFalse:[
+ nBg := DefaultViewBackground
+ ].
+ nBg := nBg onDevice:device.
+ nBg ~~ viewBackground ifTrue:[
+ self viewBackground:nBg.
+ shown ifTrue:[self clear].
+ ]
+ ].
+
+ shown ifTrue:[
+ thumbFrame := nil.
+ self invalidate.
"/ thumbFrame notNil ifTrue:[
"/ self drawThumbBackgroundInX:(thumbFrame left)
@@ -839,10 +839,10 @@
"/ ].
"/ self computeThumbFrame.
"/ self drawThumb
- ] ifFalse:[
- thumbFrame := nil
- ]
- ]
+ ] ifFalse:[
+ thumbFrame := nil
+ ]
+ ]
]
"Modified: / 21.1.1998 / 19:32:41 / cg"
@@ -982,13 +982,13 @@
|avgColor|
- thumbColor := aColor on:device.
+ thumbColor := aColor onDevice:device.
(styleSheet name ~~ #normal) ifTrue:[
avgColor := aColor averageColorIn:(0@0 corner:7@7).
- thumbShadowColor := avgColor darkened on:device.
- thumbLightColor := avgColor lightened on:device.
- thumbHalfShadowColor := thumbShadowColor darkened on:device.
- thumbHalfLightColor := thumbLightColor lightened on:device.
+ thumbShadowColor := avgColor darkened onDevice:device.
+ thumbLightColor := avgColor lightened onDevice:device.
+ thumbHalfShadowColor := thumbShadowColor darkened onDevice:device.
+ thumbHalfLightColor := thumbLightColor lightened onDevice:device.
].
self invalidate
@@ -1012,14 +1012,14 @@
!Scroller methodsFor:'drawing'!
drawHandleFormAtX:x y:y
- thumbShadowColor := thumbShadowColor on:device.
+ thumbShadowColor := thumbShadowColor onDevice:device.
self paint:thumbShadowColor.
self displayForm:shadowForm x:x y:y.
lightForm notNil ifTrue:[
- thumbLightColor := thumbLightColor on:device.
- self paint:thumbLightColor.
- self displayForm:lightForm x:x y:y.
+ thumbLightColor := thumbLightColor onDevice:device.
+ self paint:thumbLightColor.
+ self displayForm:lightForm x:x y:y.
].
"Modified: / 19.5.1998 / 16:26:49 / cg"
@@ -1829,14 +1829,14 @@
super fetchDeviceResources.
- thumbShadowColor notNil ifTrue:[thumbShadowColor := thumbShadowColor on:device].
- thumbLightColor notNil ifTrue:[thumbLightColor := thumbLightColor on:device].
- thumbHalfShadowColor notNil ifTrue:[thumbHalfShadowColor := thumbHalfShadowColor on:device].
- thumbHalfLightColor notNil ifTrue:[thumbHalfLightColor := thumbHalfLightColor on:device].
-
- thumbEnteredColor notNil ifTrue:[thumbEnteredColor := thumbEnteredColor on:device].
- ghostColor notNil ifTrue:[ghostColor := ghostColor on:device].
- ghostFrameColor notNil ifTrue:[ghostFrameColor := ghostFrameColor on:device].
+ thumbShadowColor notNil ifTrue:[thumbShadowColor := thumbShadowColor onDevice:device].
+ thumbLightColor notNil ifTrue:[thumbLightColor := thumbLightColor onDevice:device].
+ thumbHalfShadowColor notNil ifTrue:[thumbHalfShadowColor := thumbHalfShadowColor onDevice:device].
+ thumbHalfLightColor notNil ifTrue:[thumbHalfLightColor := thumbHalfLightColor onDevice:device].
+
+ thumbEnteredColor notNil ifTrue:[thumbEnteredColor := thumbEnteredColor onDevice:device].
+ ghostColor notNil ifTrue:[ghostColor := ghostColor onDevice:device].
+ ghostFrameColor notNil ifTrue:[ghostFrameColor := ghostFrameColor onDevice:device].
"Modified: 13.1.1997 / 21:56:38 / cg"
!
@@ -1944,7 +1944,7 @@
].
].
- thumbColor := thumbColor on:device.
+ thumbColor := thumbColor onDevice:device.
thumbShadowColor notNil ifTrue:[
thumbShadowColor := thumbShadowColor onDevice:device.
].
@@ -2402,5 +2402,5 @@
!Scroller class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.134 1999-07-12 14:24:33 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.135 1999-08-18 14:37:19 cg Exp $'
! !