This may be more of a curiosity and annoyance than a problem but I've
noticed when  retrieving the color values from a style gc foreground
color that the values do not remain constant. When I run the attached
python code on a RedHat 7.1 system using the installed Python 1.5.2 and
gnome-python-1.0.53, I get the following output:

<GdkColor (32512, 16408, 62744)>
<GdkColor (30211, 2057, 62744)>
30211 12593 62744

I can't figure out why the rgb values are different for what should
presumably be the same GdkColor.

Anybody got an explanation for for this odd behavior? I'm baffled.

Thanks

John

================================
#!/usr/bin/env python

from gtk import *

def main():
    w = GtkWindow()
    w.show()
    style = w.get_style()
    gc = style.white_gc
    print gc.foreground
    print gc.foreground
    print gc.foreground.red, gc.foreground.green, gc.foreground.blue
    mainloop()

if __name__ == "__main__": main()


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to