On Thu, Jun 19, 2003 at 05:50:45PM -0700, John Finlay wrote:
> 
> Hi Art,
> 
> I don't think you should get the same gtk.gdk.Color object returned from:
> 
> da.get_style().bg[gtk.STATE_NORMAL]
> 
> even twice in a row. A new gtk.gdk.Color object is created each time. I 
> assume that the rgb values are the same though.
> 

That does not seem to be the case ...

$ python
>>> import gtk
>>> da = gtk.DrawingArea()
>>> color = gtk.gdk.color_parse('#ffffff')
>>> color.red
65535
>>> color.green
65535
>>> color.blue
65535
>>> da.modify_bg(gtk.STATE_NORMAL, color)
>>> stcol = da.get_style().bg[gtk.STATE_NORMAL]
>>> stcol.red
56540
>>> stcol.green
56026
>>> stcol.blue
54741
>>> gtk.pygtk_version
(1, 99, 16)
>>>

Art

-- 
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to