Re: Forcing a specific rgb triplet in gtk



Michael Taht <mtaht mvista com> writes:

> Havoc Pennington wrote:
> 
> > Luke Gorrie <luke bluetail com> writes:
> >
> >> I want to change the colour of certain widgets at runtime.
> >> I'm using the text colour in editing widgets ("entry", radio
> >> buttons,
> >> choice menus, ...) to indicate status (e.g. red text - bad value). I
> >> define my colours in an rc-file, and use calls to widget_set_name to
> >> restyle widgets when their status changes. But - many of the widgets
> >> don't immediately take on a new style when I change their names.
> >> Labels, radio buttons, and others are being uncooperative - entries
> >> are just fine.
> >> So - how do I tell a widget to redraw itself using its new style?
> >>
> > It appears that the widget is supposed to do that automatically,
> > suggest making a small test case and putting it in bugzilla.gnome.org.
> > Thanks!
> > Havoc
> > _______________________________________________
> > gtk-list mailing list
> > gtk-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gtk-list
> 
> I'm working on a settop device that has a 256 color screen overlay of
> the video, running X and GTK. One of the colors (rgb:80/00/80) is the
> transparency color that shows the underlying video. Old style X
> programs (such as xterm and icewm) can take an rgb triplet which makes
> it easy to make them transparent in this context. However, the gtk
> based programs I've tried (notably xchat) want a set of 16 bit values
> for color, and try as hard as I might I haven't been able to convince
> them to map this color properly.(e.g 32768/0/32768 and variants
> thereof do not map to 80/00/80....

Have you tried the variant 0x8080/0/0x8080.

The correct way to convert from 8 to 16 bit color, is to multiply
by 0x101.

(I'm a little confused - is this a 24 bit display or a 8 bit 
pseudocolor/static-color?)

Regards,
                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]