Re: gtk_text: Color and font handling



In message <E14D4wg-00009S-00 fluf>you write:
>Hello
>
>Could someone please tell me how gtk_text knows which color to display
>the text.
>i.e. where and how does it store the information on the text color and
>fonts.
>I know your probably not suppose to mess with these variables but this
>will make things alot easier and faster.

In your code:

   gtk_widget_set_name (GTK_WIDGET(text), "MyTextWidget");

In ~/.gtkrc or an explicitly loaded GTK RC file:

   style "red_on_cyan_text" {
      font = "some-font-spec"
      text[NORMAL] = { 1.0, 0, 0 }
      base[NORMAL] = { 0, 1.0, 1.0 }
   }
 
   widget "*MyTextWidget" style "red_on_cyan_text"   

I *think* I got that right :) Read the docs on RC files at www.gtk.org
for more details.

--p




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