# HG changeset patch # User Claus Gittinger # Date 853197173 -3600 # Node ID e53f681448f027e9167ba8ede60cd7027d6d0bae # Parent adf84728ccb31f130d2cc63fe5a6375a80458b99 fetch device resources early diff -r adf84728ccb3 -r e53f681448f0 ListView.st --- a/ListView.st Tue Jan 14 00:09:24 1997 +0100 +++ b/ListView.st Tue Jan 14 00:12:53 1997 +0100 @@ -1391,6 +1391,17 @@ ^ super defaultControllerClass ! +fetchDeviceResources + "fetch device colors, to avoid reallocation at redraw time" + + super fetchDeviceResources. + + fgColor notNil ifTrue:[fgColor := fgColor on:device]. + bgColor notNil ifTrue:[bgColor := bgColor on:device]. + + "Created: 14.1.1997 / 00:12:12 / cg" +! + initStyle super initStyle. @@ -1400,8 +1411,10 @@ self leftMargin:(self horizontalPixelPerMillimeter:0.5) rounded. lineSpacing := 0. - fgColor := DefaultForegroundColor on:device. - bgColor := DefaultBackgroundColor on:device. + fgColor := DefaultForegroundColor. + bgColor := DefaultBackgroundColor. + + "Modified: 14.1.1997 / 00:12:19 / cg" ! initialize @@ -3474,5 +3487,5 @@ !ListView class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.115 1997-01-07 19:33:21 cg Exp $' + ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.116 1997-01-13 23:12:53 cg Exp $' ! !