--- a/SimpleView.st Sun Feb 12 13:00:20 2017 +0100
+++ b/SimpleView.st Sun Feb 12 13:00:47 2017 +0100
@@ -2257,27 +2257,28 @@
shadowColor := aColorOrImage
!
-viewBackground:something
+viewBackground:aColorOrFormOrViewBackground
"set the viewBackground to something, a color, image or form.
- If its a color and we run on a color display, also set shadow and light
+ If it's a color and we run on a color display, also set shadow and light
colors - this means, that a red view will get light-red and dark-red
edges."
|avgColor|
"/ debug check only:
- self assert:(something notNil) message:'invalid viewBackground argument'.
-
- something isColor ifTrue:[
+ self assert:(aColorOrFormOrViewBackground notNil) message:'invalid viewBackground argument'.
+
+ aColorOrFormOrViewBackground isColor ifTrue:[
(device notNil and:[device hasGrayscales]) ifTrue:[
- avgColor := something averageColorIn:(0@0 corner:7@7).
+ avgColor := aColorOrFormOrViewBackground averageColorIn:(0@0 corner:7@7).
shadowColor := avgColor darkened "on:device".
lightColor := avgColor lightened "on:device".
]
].
- super viewBackground:something
-
- "Modified: 4.7.1997 / 20:09:22 / cg"
+ super viewBackground:aColorOrFormOrViewBackground
+
+ "Modified: / 04-07-1997 / 20:09:22 / cg"
+ "Modified (format): / 12-02-2017 / 12:56:53 / cg"
!
viewBackground:something if:condition