On Sun, Sep 30, 2007 at 11:08:05AM -0600, Jeffrey Barish wrote:
> After making some changes to my program (not directly related to the GUI), I
> find that one treeview has a background of alternating light and dark
> bands, but only for certain data sets.  I never set the background in my
> code, so I expect it to be white for every data set.  The program has this

Note that the theme controls the background color of the tree view; the
background color in the default theme happens to be white.

> behavior only under Ubuntu.  On another platform, I do get a white
> background for all data sets (with the same code).  Does anyone have a clue
> what might be causing this bizarre behavior?  If I wanted to set the
> background of the treeview to alternating light and dark bands, how would I
> do that?  I find that modify_bg on the treeview does nothing (although

To get the alternating colors you would set the "rules-hint" property on
GtkTreeView to TRUE (the default is FALSE).  If you do not set this
property to TRUE, the background should always be a solid color.  Also
note that "rules-hint" is only a hint to the theme engine; if the theme
engine sets the "allow-rules" style property to FALSE (the default is
TRUE) the colors will not be alternating.

The application always has the final call about showing alternating
colors, if the application sets rules-hint to FALSE and the theme still
shows alternating colors, the theme is broken and needs to be fixed.


regards,

-kris.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to