diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-10-25 21:06:25 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-10-25 21:06:25 (GMT) |
| commit | 0d5336db012f45753abace489f18f0ca299c6961 (patch) | |
| tree | b1bf3280a9046df99226158978502eeb26f5b0a3 /library/ttk/xpTheme.tcl | |
| parent | e97381a6d921de403516d5b761539a450f4af83c (diff) | |
| parent | 1320b8a2a9c1269a345d44d673a7a35707fbbe9c (diff) | |
| download | tk-core-tip-626.zip tk-core-tip-626.tar.gz tk-core-tip-626.tar.bz2 | |
Merge 9.0core-tip-626
Diffstat (limited to 'library/ttk/xpTheme.tcl')
| -rw-r--r-- | library/ttk/xpTheme.tcl | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/library/ttk/xpTheme.tcl b/library/ttk/xpTheme.tcl index 1c900ba..60c47b0 100644 --- a/library/ttk/xpTheme.tcl +++ b/library/ttk/xpTheme.tcl @@ -62,3 +62,34 @@ namespace eval ttk::theme::xpnative { selected SystemHighlightText] } } + +# ttk::theme::xpnative::configureNotebookStyle -- +# +# Sets theme-specific option values for the ttk::notebook style $style and the +# style $style.Tab. Invoked by ::ttk::configureNotebookStyle. + +proc ttk::theme::xpnative::configureNotebookStyle {style} { + set tabPos [ttk::style lookup $style -tabposition {} nw] + switch -- [string index $tabPos 0] { + n { + ttk::style configure $style -tabmargins {2 2 2 0} + ttk::style map $style.Tab -expand {selected {2 2 2 2}} + } + s { + ttk::style configure $style -tabmargins {2 0 2 2} + ttk::style map $style.Tab -expand {selected {2 2 2 2}} + } + w { + ttk::style configure $style -tabmargins {2 2 0 2} + ttk::style map $style.Tab -expand {selected {2 2 2 2}} + } + e { + ttk::style configure $style -tabmargins {0 2 2 2} + ttk::style map $style.Tab -expand {selected {2 2 2 2}} + } + default { + ttk::style configure $style -tabmargins {2 2 2 0} + ttk::style map $style.Tab -expand {selected {2 2 2 2}} + } + } +} |
