StandardSystemView.st
changeset 4320 9bc8c69c8d4e
parent 4319 81b13632542f
child 4321 f65178d64901
--- a/StandardSystemView.st	Mon Oct 25 14:08:31 2004 +0200
+++ b/StandardSystemView.st	Mon Oct 25 15:08:47 2004 +0200
@@ -1145,59 +1145,60 @@
     "Modified: 10.6.1996 / 19:42:20 / cg"
 !
 
-convertedIcon:icon
+convertedIcon:iconArg
     "make certain, that the image argument is compatible with my device;
      this means converting it to a format (typically: monochrome) which
      the device supports. Return a compatible version of the icon."
 
-    |deviceIcon d toMono toDeep|
+    |deviceIcon d toMono toDeep icon|
 
+    icon := iconArg value.
     icon isNil ifTrue:[^ nil].
 
     toMono := toDeep := false.
 
     d := icon depth.
     device supportsDeepIcons ifFalse:[
-	(d ~~ 1 or:[icon isImage]) ifTrue:[
-	    "
-	     dither to monochrome
-	    "
-	    toMono := true.
-	]
+        (d ~~ 1 or:[icon isImage]) ifTrue:[
+            "
+             dither to monochrome
+            "
+            toMono := true.
+        ]
     ] ifTrue:[
-	d == 1 ifTrue:[
-	    icon colorMap notNil ifTrue:[
-		icon isImage ifFalse:[
-		    toMono := true.
-		] ifTrue:[
-		    toDeep := true.
-		]
-	    ]
-	] ifFalse:[
-	    d ~~ device depth ifTrue:[
-		icon isImage ifFalse:[
-		    toMono := true.
-		] ifTrue:[
-		    toDeep := true.
-		]
-	    ]
-	]
+        d == 1 ifTrue:[
+            icon colorMap notNil ifTrue:[
+                icon isImage ifFalse:[
+                    toMono := true.
+                ] ifTrue:[
+                    toDeep := true.
+                ]
+            ]
+        ] ifFalse:[
+            d ~~ device depth ifTrue:[
+                icon isImage ifFalse:[
+                    toMono := true.
+                ] ifTrue:[
+                    toDeep := true.
+                ]
+            ]
+        ]
     ].
 
     deviceIcon := icon.
     toMono ifTrue:[
-	deviceIcon := icon asMonochromeFormOn:device.
+        deviceIcon := icon asMonochromeFormOn:device.
     ].
     toDeep ifTrue:[
-	deviceIcon := (Image implementorForDepth:device depth)
-			fromImage:icon.
+        deviceIcon := (Image implementorForDepth:device depth)
+                        fromImage:icon.
     ].
 
     deviceIcon notNil ifTrue:[
-	"
-	 get device pixmap (i.e. allocate colors & resource)
-	"
-	deviceIcon := deviceIcon onDevice:device
+        "
+         get device pixmap (i.e. allocate colors & resource)
+        "
+        deviceIcon := deviceIcon onDevice:device
     ].
     ^ deviceIcon
 
@@ -1541,7 +1542,7 @@
 !StandardSystemView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.160 2004-10-25 12:08:31 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.161 2004-10-25 13:08:47 cg Exp $'
 ! !
 
 StandardSystemView initialize!