#OTHER by stefan
authorStefan Vogel <sv@exept.de>
Wed, 20 Jul 2016 11:35:46 +0200
changeset 5167 44864b178d31
parent 5166 a9334ae0d171
child 5168 96310a1e5360
#OTHER by stefan use #blackColor and #whiteColor form device instead of (Color black) and (Color white)
ThumbWheel.st
--- a/ThumbWheel.st	Wed Jul 20 11:35:38 2016 +0200
+++ b/ThumbWheel.st	Wed Jul 20 11:35:46 2016 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1996 by eXept Software AG / Claus Gittinger
 	      All Rights Reserved
@@ -461,76 +463,76 @@
 
     thumbColor := View defaultViewBackgroundColor.
     thumbColor ~= viewBackground ifTrue:[
-	self paint:thumbColor.
-	orientation == #vertical ifTrue:[
-	    self fillRectangleX:3 y:y0 width:width-6 height:height-8.
-	] ifFalse:[
-	    self fillRectangleX:x0 y:3 width:width-8 height:height-6.
-	]
+        self paint:thumbColor.
+        orientation == #vertical ifTrue:[
+            self fillRectangleX:3 y:y0 width:width-6 height:height-8.
+        ] ifFalse:[
+            self fillRectangleX:x0 y:3 width:width-8 height:height-6.
+        ]
     ].
 
     ((thumbPosition truncateTo:tallyAngle))
     to:((thumbPosition + angleRange truncateTo:tallyAngle)+tallyAngle) by:tallyAngle do:[:a |
-	|yT pA xT d|
+        |yT pA xT d|
 
-	pA := a - thumbPosition.
-	d := (pA degreesToRadians cos).
-	yT := halfHeight + (d * (halfHeight - 4)) - 1.
-	xT := halfWidth + (d * (halfWidth - 4)) - 1.
+        pA := a - thumbPosition.
+        d := (pA degreesToRadians cos).
+        yT := halfHeight + (d * (halfHeight - 4)) - 1.
+        xT := halfWidth + (d * (halfWidth - 4)) - 1.
 
-	xT := xT min:x1.
-	yT := yT min:y1.
+        xT := xT min:x1.
+        yT := yT min:y1.
 
-	(pA > (angleRange * 7 // 8)) ifTrue:[
-	    self paint:shadowColor
-	] ifFalse:[
-	    self paint:Color black.
-	].
+        (pA > (angleRange * 7 // 8)) ifTrue:[
+            self paint:shadowColor
+        ] ifFalse:[
+            self paint:self blackColor.
+        ].
 
-	orientation == #vertical ifTrue:[
-	    self displayLineFromX:3 y:yT toX:width-4 y:yT.
-	] ifFalse:[
-	    self displayLineFromX:xT y:3 toX:xT y:height-4.
-	].
+        orientation == #vertical ifTrue:[
+            self displayLineFromX:3 y:yT toX:width-4 y:yT.
+        ] ifFalse:[
+            self displayLineFromX:xT y:3 toX:xT y:height-4.
+        ].
 
-	(pA between:(angleRange * 4 // 8) and:(angleRange * 7 // 8)) ifTrue:[
-	    self paint:Color white.
-	    orientation == #vertical ifTrue:[
-		self displayLineFromX:3 y:yT-1 toX:width-5 y:yT-1.
-	    ] ifFalse:[
-		self displayLineFromX:xT-1 y:3 toX:xT-1 y:height-5.
-	    ].
+        (pA between:(angleRange * 4 // 8) and:(angleRange * 7 // 8)) ifTrue:[
+            self paint:self whiteColor.
+            orientation == #vertical ifTrue:[
+                self displayLineFromX:3 y:yT-1 toX:width-5 y:yT-1.
+            ] ifFalse:[
+                self displayLineFromX:xT-1 y:3 toX:xT-1 y:height-5.
+            ].
 
-	    (pA between:(angleRange * 4 // 8) and:(angleRange * 6 // 8)) ifTrue:[
-		self paint:Color white.
-		orientation == #vertical ifTrue:[
-		    self displayLineFromX:3 y:yT-2 toX:width-5 y:yT-2.
-		] ifFalse:[
-		    self displayLineFromX:xT-2 y:3 toX:xT-2 y:height-5.
-		]
-	    ]
-	]
+            (pA between:(angleRange * 4 // 8) and:(angleRange * 6 // 8)) ifTrue:[
+                self paint:self whiteColor.
+                orientation == #vertical ifTrue:[
+                    self displayLineFromX:3 y:yT-2 toX:width-5 y:yT-2.
+                ] ifFalse:[
+                    self displayLineFromX:xT-2 y:3 toX:xT-2 y:height-5.
+                ]
+            ]
+        ]
     ].
 
-    self paint:Color white. "/lightColor.
+    self paint:self whiteColor. "/lightColor.
     orientation == #vertical ifTrue:[
-	self displayLineFromX:2 y:y0 toX:2 y:y1.
+        self displayLineFromX:2 y:y0 toX:2 y:y1.
     ] ifFalse:[
-	self displayLineFromX:x0 y:2 toX:x1 y:2.
+        self displayLineFromX:x0 y:2 toX:x1 y:2.
     ].
 
     self paint:shadowColor.
     orientation == #vertical ifTrue:[
-	self displayLineFromX:width-4 y:y0 toX:width-4 y:y1.
+        self displayLineFromX:width-4 y:y0 toX:width-4 y:y1.
     ] ifFalse:[
-	self displayLineFromX:x0 y:height-4 toX:x1 y:height-4.
+        self displayLineFromX:x0 y:height-4 toX:x1 y:height-4.
     ].
     self displayLineFromX:width-4 y:y0-1 toX:width-4 y:y1+1.
 
     orientation == #vertical ifTrue:[
-	self displayLineFromX:width-4 y:y0 toX:width-4 y:y1.
+        self displayLineFromX:width-4 y:y0 toX:width-4 y:y1.
     ] ifFalse:[
-	self displayLineFromX:x0 y:height-4 toX:x1 y:height-4.
+        self displayLineFromX:x0 y:height-4 toX:x1 y:height-4.
     ].
 
     "Created: / 27.9.1996 / 16:04:49 / cg"