[Tkinter-discuss] Tkinter aesthetic

Jeff Epler jepler at unpythonic.net
Wed Mar 17 12:18:50 EST 2004


On Wed, Mar 17, 2004 at 01:51:28PM -0300, Batista, Facundo wrote:
> The other day in #python at irc.freenode.net, an user told me that Tkinter
> under Linux is *very* ugly (he migrated to GTK+ because of this).
> 
> Is there a plan to beautify it?

We're captive to what the tcl/tk folks give us, for the most part.

Tcl/Tk 8.5 (I tried a CVS version a few weeks ago) looks visually much
better on Linux, mostly for the following reasons:
* Support for subpixel rendering of fonts (./configure --enable-xft)
* The indicator on checkbuttons and radiobuttons has a 
  "windows style" instead of the old motif style.
* The images in tk_dialog are now in color

Another glaringly ugly widget, the scrollbar, doesn't appear to have
changed.  There are some ugly hacks to make Tk (as far back as 8.2)
place win95-look images over the ugly motif-style widgets, but the code
is written in Tcl and is likely to turn your stomach:
    http://unpy.net/cgi-bin/viewcvs.cgi/nf/rb.tcl
    http://unpy.net/cgi-bin/viewcvs.cgi/nf/cb.tcl
    http://unpy.net/cgi-bin/viewcvs.cgi/nf/sb.tcl

A combobox has yet to be added, but bwidgets has one that looks pretty
much like win95.  (I've never tried the bwidgets wrappers, which are at
http://effbot.org/zone/bwidgets.htm)

Setting up a good options database helps, too, for instance by making
the background of entry and text widgets white, and by using a
normal-weight sans-serif font.  Something along the
lines of
    http://unpy.net/cgi-bin/viewcvs.cgi/nf/options.tcl?rev=1.20.6.1&content-type=text/vnd.viewcvs-markup

Tk still doesn't do fancy stuff like track the Gnome or KDE theme, which
is what you'd really want.

Jeff
PS If you want to try tk8.5 with Python, you'll need the patch from
python.org/sf/905863 



More information about the Tkinter-discuss mailing list