[maemo-developers] Changing background colors of GtkEntry's (A possible bug in GTK or sapwood?)

From: Christian Antila christian.antila at gmail.com
Date: Thu May 1 16:57:42 EEST 2008
Hello!

I have some really big problems. I have a deadline tomorrow and i REALLY
need to change the background color of a couple of GtkEntry's and a
GtkTextView. The problem is that i really can't figure out how to do that. I
have googled my ass off, read every page in GTK+ manual, read the sapwood
engine manual, and I have tried everything. But it really looks like it is
impossible to change the background of a GtkEntry.

For the moment I use a .gtkrc file that looks like this:
style "testing"
{
  bg[NORMAL] = "blue"
  bg[ACTIVE] = "blue"
  bg[SELECTED] = "blue"
  text[NORMAL] = "green"
  text[ACTIVE] = "green"
  text[SELECTED] = "green"

  engine "sapwood"
  {
  image {
  function = FOCUS
  file = "test.png"
  }

  # Default
  image {
  function = BOX
  file = "test.png"
  }
  }
}
widget_class "*" style "testing"

All widgets get a background color, foreground color and a background image.
The GtkEntry/GtkTextView gets a forground color, but the background color is
untouched.

Can someone please confirm if this is a bug, or if I'm just doing anything
wrong? The best solution would be if I was able to set a .png file as
border, and another .png file when the GtkEntry/GtkTextView is focused. But
as long as I can get a black background color I will be satisified.


Best regards,
Christian Antila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20080501/e8b724f7/attachment.htm 
More information about the maemo-developers mailing list