Pat Thoyts <pattho...@gmail.com> added the comment:

So if you look at the clamTheme.tcl file you can see the definition of the map 
for the TNotebook.Tab style looks like the following:

    ttk::style map TNotebook.Tab \
      -padding [list selected {6 4 6 2}] \
      -background [list selected $colors(-frame) {} $colors(-darker)] \
      -lightcolor [list selected $colors(-lighter) {} $colors(-dark)] \
      ;

The vista theme uses these too on Windows.

So calling this from script we can see the resulting empty elements in tcl:

    % ttk::style map TNotebook.Tab
    -lightcolor {selected #eeebe7 {} #cfcdc8} -padding {selected {6 4 6 2}} 
-background {selected #dcdad5 {} #bab5ab}

As I put in the bug, this gets mistranslated in python with the value for that 
state map element getting put into the first element.

The simplest demonstration is that the following raises an exception:

    import tkinter as tk
    import tkinter.ttk as ttk
    style = ttk.Style()
    style.theme_use('clam')
    style.map('Custom.TNotebook.Tab', **style.map('TNotebook.Tab'))

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42328>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to