Forcing a specific rgb triplet in gtk



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....

Is there a way to force a gtk based app to use a specific rgb triplet/change the visual/do whatever, to ensure a certain color is exactly the color I need for the transparent color?


--
-----------------------------------------------------------------
mtaht mvista com, Member,       | Practice does NOT make perfect.
 Visionary Staff, MontaVista    | Practice makes Permanent.
 http://www.mvista.com        | - Peter Sterbach

OK, MPAA, try feeding this to your lawyers!

#!/usr/bin/perl -w
# 531-byte qrpff-fast, Keith Winstein and Marc Horowitz <sipb-iap-dvd mit edu>
# MPEG 2 PS VOB file on stdin -> descrambled output on stdout
# arguments: title key bytes in least to most-significant order
$_='while(read+STDIN,$_,2048){$a=29;$b=73;$c=142;$t=255;@t=map{$_%16or$t^=$c^=(
$m=(11,10,116,100,11,122,20,100)[$_/16%8])&110;$t^=(72,@z=(64,72,$a^=12*($_%16
-2?0:$m&17)),$b^=$_%64?12:0,@z)[$_%8]}(16..271);if((@a=unx"C*",$_)[20]&48){$h
=5;$_=unxb24,join"",@b=map{xB8,unxb8,chr($_^$a[--$h+84])} ARGV;s/...$/1$&/;$
d=unxV,xb25,$_;$e=256|(ord$b[4])<<9|ord$b[3];$d=$d>>8^($f=$t&($d>>12^$d>>4^
$d^$d/8))<<17,$e=$e>>8^($t&($g=($q=$e>>14&7^$e)^$q*8^$q<<6))<<9,$_=$t[$_]^
(($h>>=8)+=$f+(~$g&$t))for a[128  $#a]}print+x"C*",@a}';s/x/pack+/g;eval





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