Message380994
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')) |
|
Date |
User |
Action |
Args |
2020-11-14 23:32:22 | Pat Thoyts | set | recipients:
+ Pat Thoyts, terry.reedy, serhiy.storchaka, patthoyts |
2020-11-14 23:32:22 | Pat Thoyts | set | messageid: <1605396742.86.0.540407154342.issue42328@roundup.psfhosted.org> |
2020-11-14 23:32:22 | Pat Thoyts | link | issue42328 messages |
2020-11-14 23:32:22 | Pat Thoyts | create | |
|