On Tue, 7 Mar 2006 17:27:44 -0500
DJ Delorie <[EMAIL PROTECTED]> wrote:

> > any idea what we'd need to do to support a private colormap (a la 
> > -install for mozilla) in the lesstif and gtk HID versions of the PCB?
> 
> For lesstif, you should be able to just allocate a private colormap in
> lesstif_parse_arguments() and XtSetValues it into the first widget created
> by XtAppInitialize.
> 
> Or you could defer it until lesstif_do_export and assign it there.
> 
> Avoiding the psychedelic flashing color palettes is a much harder
> problem.
> 
> Are we really using that many colors in the lesstif hid?
> 
> Another option is adding a "find closest color" feature to the color
> allocator.  That will at least cover the colors used by the circuit
> board itself.

Gtk has functions for using a private colormap, so it should be an
easy experiment to try.  Umm, maybe not so easy with the HID
since it seems color allocation is now done in multiple spots, but on the
Sourceforge CVS, where all color is done in one place, try changing
the line in gui-utils.c:

   colormap = gtk_widget_get_colormap(out->top_window);

to

   colormap = gdk_colormap_new(gdk_visual_get_system(), TRUE);

For the actual color allocation, it already uses "best match".

Bill

Reply via email to