GNOME Bugzilla – Bug 468764
GtkTreeView forgets color setting after first tree operation
Last modified: 2007-08-21 08:04:12 UTC
Please describe the problem: I have a tree view that can have custom background color set by the code like this: GdkColor color; gdk_color_parse ("#ed4eea860537", &color); gtk_widget_modify_base(GTK_WIDGET(treeview1), GTK_STATE_NORMAL, &color); The problem is that the color resets to the white after the first tree operation is made (adding new node into the tree store). Problem can be reproduced on Ubuntu Feisty and other Linux distros, but the code works fine on Windows OS using http://gladewin32.sourceforge.net (v 2.10.11) Steps to reproduce: 1. Get test program from http://notecase.sourceforge.net/test.zip 2. Compile and start, tree view is initially yellow 3. Press "Add" button to add new node into the tree Actual results: Tree view becomes white (bkg color) Expected results: Tree view should remember its color all the time (as it works correctly on Windows) Does this happen every time? Yes Other information:
What you see here is that every row draws it's own background, overwriting the background color you set on the tree view. For now you can work around this by setting the odd-row-color and even-row-color properties. Marking as duplicate of the general background image bug. *** This bug has been marked as a duplicate of 71926 ***