summaryrefslogtreecommitdiffstats
path: root/library/ttk/xpTheme.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/ttk/xpTheme.tcl')
-rw-r--r--library/ttk/xpTheme.tcl31
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}}
+ }
+ }
+}