Are Python Tkinter Ttk Themes Available Based On The Operating System
Solution 1:
I don't think they are (all) cross-platform, not only from my experience but also from the following excerpt from the paper "The Tile Widget Set" (pp. 1-2) by Joe English, 2004 (a little bit old, but I think these things still hold today).
Figure 1 shows 3 different buttons. The first is a classic Motif-style button. Notice the outer highlight ring (indicating keyboard focus) and the thick inner border (indicating that this is the "default" button). The second is a Windows-style button: it has a slightly different border and the focus indicator is a dashed box drawn inside the border instead of a solid box on the outside. The third button is a different possibility altogether.
Except those aren't really three different buttons: it's actually the same button drawn under three different themes.
The Tile package includes several built-in themes. The default theme on X11 has a new, streamlined look; a classic theme implementing Tk's current Motif-like appearance is also available.
On Windows XP, the
xpnative
theme uses the Windows "Visual Styles" API to make Tk widgets indistinguishable from native controls. On other versions of Windows, thewinnative
theme matches the Microsoft Windows User Experience guidelines.On Mac OSX, the
aqua
theme uses the Carbon Appearance Manager for (almost-)native appearance on that platform.New themes can be implemented as add-on packages written in Tcl or in C, depending on the level of customization required.
A Tile theme is a collection of elements, layouts, and styles, which are combined with widget options to determine the look and feel.
So, in conclusion, there are custom themes for different operating systems. You can also implement yours using C or Tcl.
Post a Comment for "Are Python Tkinter Ttk Themes Available Based On The Operating System"