SelListV.st
changeset 941 f06fa4d47f26
parent 898 5a61224fecbc
child 965 ff8e6542eb13
--- a/SelListV.st	Tue Jan 14 00:12:53 1997 +0100
+++ b/SelListV.st	Tue Jan 14 00:15:53 1997 +0100
@@ -2065,6 +2065,19 @@
 
 !SelectionInListView methodsFor:'initialization'!
 
+fetchDeviceResources
+    "fetch device colors, to avoid reallocation at redraw time"
+
+    super fetchDeviceResources.
+
+    hilightFgColor notNil ifTrue:[hilightFgColor := hilightFgColor on:device].
+    hilightBgColor notNil ifTrue:[hilightBgColor := hilightBgColor on:device].
+    halfIntensityFgColor notNil ifTrue:[halfIntensityFgColor := halfIntensityFgColor on:device].
+    hilightFrameColor notNil ifTrue:[hilightFrameColor := hilightFrameColor on:device].
+
+    "Created: 14.1.1997 / 00:11:13 / cg"
+!
+
 initCursor
     "set the cursor - a hand"
 
@@ -2139,10 +2152,10 @@
     ].
 
     DefaultShadowColor notNil ifTrue:[
-        shadowColor := DefaultShadowColor on:device
+        shadowColor := DefaultShadowColor
     ].
     DefaultLightColor notNil ifTrue:[
-        lightColor := DefaultLightColor on:device
+        lightColor := DefaultLightColor
     ].
 
     (hilightLevel abs > 0) ifTrue:[
@@ -2162,14 +2175,7 @@
         halfIntensityFgColor := Color darkGray.
     ].
 
-    fgColor := fgColor on:device.
-    bgColor := bgColor on:device.
-    halfIntensityFgColor := halfIntensityFgColor on:device.
-    hilightFrameColor notNil ifTrue:[hilightFrameColor := hilightFrameColor on:device].
-    hilightFgColor := hilightFgColor on:device.
-    hilightBgColor := hilightBgColor on:device.
-
-    "Modified: 28.5.1996 / 21:13:51 / cg"
+    "Modified: 14.1.1997 / 00:13:41 / cg"
 !
 
 initialize
@@ -3092,5 +3098,5 @@
 !SelectionInListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Attic/SelListV.st,v 1.84 1996-12-19 13:48:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Attic/SelListV.st,v 1.85 1997-01-13 23:14:02 cg Exp $'
 ! !