Re: Spontaneous background colors in treeview



Kristian Rietveld wrote:

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.

The rules-hint property is always False in the TreeView regardless of which
data set I display.  If I set rules-hint to True, I do indeed get
alternating colors in the background with all data sets.  However, the
colors are darker for the data sets that had alternating colors already. 
From your last statement, I conclude that the Ubuntu theme is broken.  I
gather that the reason I do not get alternating colors in the background of
the treeview on the other platform with exactly the same code is that the
theme on that platform is not broken.

Because the background comes and goes depending on the data I display, it
must be that something in the data is provoking the defect in the theme. 
If I can find out what that is, perhaps I will have a clue how to fix the
theme.

Stop presses.  It's the number of columns.  All data sets that require 3
columns have a background.  All data sets that require 2 columns do not.

Here it is.  If I comment out the line that sets the sort indicator, I do
not get the colored background for any data set.
-- 
Jeffrey Barish




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