[Gtk-sharp-list] Widget Background Color 'anomaly', and request for further reading

hywelt hywel at controlspecials.demon.co.uk
Sat Jan 24 06:21:23 EST 2009


I've had a quick look already at the Gtk+ source and docs, but got a bit lost
with the complications of colours, and thought that I might be missing
something obvious.  Your info re "modifier style" is helpful, as I hadn't
come across this extra factor.  As it happens, I've satisfied my immediate
needs by using the 'ModifyBg' method without the colour parameter, which
restores the default colour (perhaps from some form of stack?), but I'm
surprised that trying to *read* the current background could be construed as
'advanced'!  I'll see what the Gtk+ lists have to say.

--
Hywel Thomas


Michael Hutchinson wrote:
> 
> I took a look in the GTK+ docs, and I concur with your reading of the
> Backgrounds array. However, from poking around in the GTK source, it
> seems that widgets have a "modifier style" that has flags to indicate
> which colours should override the base style. Unless you're using
> these flags correctly, things may not work as you intend. The Modify*
> methods handle correctly setting and unsetting all this for you, but I
> don't see an obvious supported way to *read* the colour.
> 
> http://library.gnome.org/devel/gtk/stable/GtkWidget.html#gtk-widget-get-modifier-style
> http://svn.gnome.org/viewvc/gtk%2B/trunk/gtk/gtkwidget.c?view=markup
> 
> For advanced details like this, you'll probably have more luck on the
> GTK+ lists.
> 
> -- 
> Michael Hutchinson
> http://mjhutchinson.com
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> 
> 

-- 
View this message in context: http://www.nabble.com/Widget-Background-Color-%27anomaly%27%2C-and-request-for-further-reading-tp21606361p21639596.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.



More information about the Gtk-sharp-list mailing list