gtk widget subclasses and theme/style inheritance



hello-

forgive me if this has been discussed elsewhere, but i've been unable to 
find anything relevant via google, and the mailing list search feature 
appears to be broken.

i've written a subclass of GtkImageMenuItem, called XfceAppMenuItem.  
visually, it's the same as GtkImageMenuItem (or at least it's supposed 
to be).  however, it doesn't seem to be inheriting its theme properly.  
if i have a menu with mixed items (some GtkImageMenuItem, some 
XfceAppMenuItem), and i select the "Default" gtk2 theme, the 
GtkImageMenuItem instances have a white text color when the item is 
highlighted, but XfceAppMenuItem keeps its black text when highlighted.  
i've heard reports that something similar happens with some other (but 
not all) themes as well.

i've tried using gtk_widget_set_name(mi, "GtkMenuItem"), but that didn't 
work.  i've used gdb to examine the GtkStyle struct returned by 
gtk_widget_get_style() for both a regular GtkMenuItem and an 
XfceAppMenuItem, and the color listings are identical (for all 5 
GTK_STATE_* types).

i'm getting rather frustrated, and i'm hoping someone might be able to 
shed some light on this.

thanks,
brian




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