--- a/ViewStyle.st Tue Sep 22 17:56:05 2015 +0200
+++ b/ViewStyle.st Tue Sep 22 18:12:36 2015 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
@@ -174,7 +176,19 @@
"retrieve a color resource - also aquire a device color
to avoid repeated color allocations later"
- ^ self deviceResourceAt:aKey default:default
+ |value device deviceColor|
+
+ device := Display.
+
+ value := self at:aKey default:default.
+ value isInteger ifTrue:[
+ value := Color rgbValue:value
+ ].
+ (value notNil and:[device notNil]) ifTrue:[
+ deviceColor := value onDevice:device.
+ deviceColor notNil ifTrue:[^ deviceColor].
+ ].
+ ^ value
!
deviceResourceAt:aKey default:default