fixed #fgColor;
authorClaus Gittinger <cg@exept.de>
Thu, 03 Apr 1997 21:26:45 +0200
changeset 347 3264e5caa799
parent 346 698695a95a8c
child 348 58d52a823cca
fixed #fgColor; added comments.
ProgressIndicator.st
--- a/ProgressIndicator.st	Thu Apr 03 20:38:16 1997 +0200
+++ b/ProgressIndicator.st	Thu Apr 03 21:26:45 1997 +0200
@@ -481,12 +481,12 @@
 foregroundColor:aColor 
     "set the percentage displays foreground color"
 
-    fgColor := aColor
+    fgColor := aColor.
     shown ifTrue:[
         self invalidate
     ].
 
-    "Modified: 29.3.1997 / 16:27:41 / cg"
+    "Modified: 3.4.1997 / 21:14:32 / cg"
 !
 
 showPercentage
@@ -528,17 +528,17 @@
     w := width - (m*2).
     h := height - (m*2).
 
-    s := percentage printString , ' %'.
-    sw := font widthOf:s.
-    sx := (width - sw) // 2.
-    sy := height // 2 + font descent + 2.
-
     rx := (w * percentage / 100) rounded.
 
-    self paint:Color white.
+    self paint:viewBackground.
     self fillRectangleX:m y:m width:w height:h.
 
     showPercentage ifTrue:[
+        s := percentage printString , ' %'.
+        sw := font widthOf:s.
+        sx := (width - sw) // 2.
+        sy := height // 2 + font descent + 2.
+
         rx <= (sx+sw) ifTrue:[
             self paint:Color black.
             self displayString:s x:sx y:sy.
@@ -556,6 +556,8 @@
             self clippingRectangle:nil
         ]
     ]
+
+    "Modified: 3.4.1997 / 21:15:48 / cg"
 ! !
 
 !ProgressIndicator methodsFor:'initialization'!
@@ -565,14 +567,18 @@
 
     super initialize.
 
+    self is3D ifTrue:[
+        self level:-1
+    ].
     viewBackground := styleSheet colorAt:'progressIndicatorViewBackground' default:Color white.
+
     fgColor := styleSheet colorAt:'progressIndicatorForegroundColor' default:Color blue.
     fgColor := fgColor onDevice:device.
 
     percentage := 0.
     showPercentage := true.
 
-    "Modified: 29.3.1997 / 16:14:03 / cg"
+    "Modified: 3.4.1997 / 21:15:29 / cg"
 ! !
 
 !ProgressIndicator methodsFor:'queries'!
@@ -678,5 +684,5 @@
 !ProgressIndicator class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ProgressIndicator.st,v 1.14 1997-03-29 15:27:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ProgressIndicator.st,v 1.15 1997-04-03 19:26:45 cg Exp $'
 ! !