ViewStyle.st
changeset 6920 cbe27edb6e72
parent 5952 5a8e9468117a
child 6924 295e6d594ca0
--- a/ViewStyle.st	Tue Sep 22 15:51:45 2015 +0200
+++ b/ViewStyle.st	Tue Sep 22 15:53:35 2015 +0200
@@ -11,6 +11,8 @@
 "
 "{ Package: 'stx:libview' }"
 
+"{ NameSpace: Smalltalk }"
+
 ResourcePack subclass:#ViewStyle
 	instanceVariableNames:'name is3D viewGrey'
 	classVariableNames:''
@@ -153,7 +155,19 @@
     "retrieve a color resource - also aquire a device color
      to avoid repeated color allocations later"
 
-    ^ self deviceResourceAt:aKey default:nil 
+    |value device deviceColor|
+
+    device := Display.
+
+    value := self at:aKey default:nil.
+    value isInteger ifTrue:[
+        value := Color rgbValue:value
+    ].
+    (value notNil and:[device notNil]) ifTrue:[
+        deviceColor := value onDevice:device.
+        deviceColor notNil ifTrue:[^ deviceColor].
+    ].
+    ^ value
 !
 
 colorAt:aKey default:default
@@ -301,9 +315,10 @@
 !ViewStyle class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/ViewStyle.st,v 1.36 2012-11-13 14:00:23 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/ViewStyle.st,v 1.36 2012-11-13 14:00:23 cg Exp $'
+    ^ '$Header$'
 ! !
+