[Tkinter-discuss] Macosx Tk colors changed
Michael O'Donnell
micko at wagsoft.com
Wed May 29 18:03:21 CEST 2013
Dear all,
My application manages the window appearance by building a frame with gifs,
and filling with a background color that should be identical to that
of the gifs.
This has been fine under all versions of Python up to and
including 3.3.2. But under 3.3.2 on MACOSX, Idle recommended I upgrade
to Tk 8.5.14 (previously I had 8.5.9), so I upgraded from ActiveState.
Now, the background color is a shade or two lighter than the gifs,
making my interface look clunky.
When I move back to Windows, where the Python installer for 3.3.2
includes Tk 8.5.11, I have no problem. So I am not sure if it is Tk version
after 11, or if it is a later version but just on the Mac.
Does anyone know anything about changes to Tk colour rendering
that might explain this.
A test case is below (Python 3), with the required GIF file in attachment.
If all is fine, the canvas presents a uniform gray. If there is a small
lighter gray square in the middle, then you have duplicated the problem.
import tkinter
root = tkinter.Tk()
print("TK Version: ", root.getvar("tk_patchLevel"))
c=tkinter.Canvas(root, bg="#bbc0c6", height=100, width=100)
c.pack(side='left')
button=tkinter.PhotoImage(file="left.gif")
c.create_image(50, 50, anchor="nw", image=button)
root.mainloop()
Any help welcome,
Mick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: left.gif
Type: image/gif
Size: 74 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20130529/69c3cc36/attachment.gif>
More information about the Tkinter-discuss
mailing list