pygtk2 and colors

nickgeovanis at gmail.com nickgeovanis at gmail.com
Tue Jul 7 15:57:22 CEST 2015


Morning-
With python 2.7.5, pygtk 2.24, gtk 2.24:
The following snippet successfully sets the line_width but not the foreground color, and I can't figure-out why. The color human-name and the result returned by gtk.gdk.color_parse are correct. Clues? Thanks.

self.gc.set_line_attributes(myclass.board_line_width, gtk.gdk.LINE_SOLID,
                                      gtk.gdk.CAP_ROUND, gtk.gdk.JOIN_BEVEL)
fg = gtk.gdk.color_parse(myclass.board_foreground)
self.gc.set_foreground(fg)


More information about the Python-list mailing list