From: Patrick S. <ko...@fi...> - 2001-02-23 03:07:20
|
I have started with the sample-display.c file. I figure there needs to be a new set of colors ie. ifdef _Selected static const int selected_colors[] = { 256, 200, 200, /* bg */ 100, 256, 100, /* fg */ 0, 0, 230, /* mixerpos */ 40, 40, 0, /* zero */ 240, 230, 240, /* sel */ 255, 255, 255, /* tmp_sel */ 20, 240, 10, /* crossing */ 200, 50, 80, /* minmax */ 180, 0, 100, /* highlight (treble)*/ 0, 80, 200, /* lowlight (bass)*/ }; #else static const int selected_colors[] = { 256, 200, 200, /* bg */ 100, 256, 100, /* fg */ 0, 0, 230, /* mixerpos */ 40, 40, 0, /* zero */ 240, 230, 240, /* sel */ 255, 255, 255, /* tmp_sel */ 20, 240, 10, /* crossing */ 200, 50, 80, /* minmax */ 180, 0, 100, /* highlight (treble)*/ 0, 80, 200, /* lowlight (bass)*/ }; #endif ------------------------ and under: static void sample_display_class_init (SampleDisplayClass *class) { . . . . /* selected background changes color */ for(n = 0, q = selected_colors, c = class->colors; n < SAMPLE_DISPLAYCOL_LAST; n++, c++) { c->red = *p++ * 65535 / 255; c->green = *p++ * 65535 / 255; c->blue = *p++ * 65535 / 255; c->pixel = (glong)((c->red & 0xff00)*256 + (c->green & 0xff00) + (c->blue & 0xff00)/256); gdk_color_alloc(gdk_colormap_get_system(), c); } ----------------------------- I wonder if n = 0 should be n = 1. I named the colors "selected_colors". This seemed to fit with the previous example for the default_colors. Conrad - Can you tell me if I'm on the right track? As of yet this patch does not work but I suspect it would be relatively easy to write if I knew what I am doing ;-]. Patrick. _____________________________________________________________ Want a new web-based email account ? ---> http://www.firstlinux.net |