summaryrefslogtreecommitdiffstats
path: root/library/ttk
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-01-15 22:00:39 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-01-15 22:00:39 (GMT)
commit0f16d8509b1288668c45248a85ded72fe6f77da4 (patch)
tree862469878d9e792ae780b399c1eefb37ed998118 /library/ttk
parent2ece75e8790071956e71a9f917a6b68ab94b6ff3 (diff)
parentf413e249b3c0711dbefa5521ed2cc26c5bd20968 (diff)
downloadtk-0f16d8509b1288668c45248a85ded72fe6f77da4.zip
tk-0f16d8509b1288668c45248a85ded72fe6f77da4.tar.gz
tk-0f16d8509b1288668c45248a85ded72fe6f77da4.tar.bz2
Merge 8.7. -gripcount -> gripsize and diameter -> size
Diffstat (limited to 'library/ttk')
-rw-r--r--library/ttk/altTheme.tcl21
-rw-r--r--library/ttk/clamTheme.tcl14
-rw-r--r--library/ttk/classicTheme.tcl21
-rw-r--r--library/ttk/defaults.tcl20
-rw-r--r--library/ttk/vistaTheme.tcl6
-rw-r--r--library/ttk/winTheme.tcl27
-rw-r--r--library/ttk/xpTheme.tcl5
7 files changed, 47 insertions, 67 deletions
diff --git a/library/ttk/altTheme.tcl b/library/ttk/altTheme.tcl
index 713f0be..a9b8748 100644
--- a/library/ttk/altTheme.tcl
+++ b/library/ttk/altTheme.tcl
@@ -8,7 +8,7 @@ namespace eval ttk::theme::alt {
array set colors {
-frame "#d9d9d9"
-window "#ffffff"
- -alternate "#f0f0f0"
+ -alternate "#f0f0f0"
-darker "#c3c3c3"
-border "#414141"
-activebg "#ececec"
@@ -43,11 +43,10 @@ namespace eval ttk::theme::alt {
{active !disabled} raised
} -highlightcolor {alternate black}
- set indMargin {0 1.5p 3p 1.5p}
ttk::style configure TCheckbutton -indicatorcolor "#ffffff" \
- -indicatormargin $indMargin -padding 1.5p
+ -indicatormargin {0 1.5p 3p 1.5p} -padding 1.5p
ttk::style configure TRadiobutton -indicatorcolor "#ffffff" \
- -indicatormargin $indMargin -padding 1.5p
+ -indicatormargin {0 1.5p 3p 1.5p} -padding 1.5p
ttk::style map TCheckbutton -indicatorcolor \
[list pressed $colors(-frame) \
alternate $colors(-altindicator) \
@@ -58,7 +57,7 @@ namespace eval ttk::theme::alt {
disabled $colors(-frame)]
ttk::style configure TMenubutton \
- -width -11 -arrowsize 3.75p -padding 2.25p -relief raised
+ -width -11 -padding 2.25p -arrowsize 3.75p -relief raised
ttk::style configure TEntry -padding 1
ttk::style map TEntry -fieldbackground \
@@ -87,13 +86,12 @@ namespace eval ttk::theme::alt {
ttk::style configure TLabelframe -relief groove -borderwidth 2
- set margins {1.5p 1.5p 0.75p 0}
- ttk::style configure TNotebook -tabmargins $margins
+ ttk::style configure TNotebook -tabmargins {1.5p 1.5p 0.75p 0}
ttk::style configure TNotebook.Tab -background $colors(-darker) \
-padding {3p 1.5p}
ttk::style map TNotebook.Tab \
-background [list selected $colors(-frame)] \
- -expand [list selected $margins]
+ -expand {selected {1.5p 1.5p 0.75p 0}}
# Treeview:
ttk::style configure Heading -font TkHeadingFont -relief raised
@@ -107,15 +105,12 @@ namespace eval ttk::theme::alt {
-foreground [list disabled $colors(-disabledfg) \
selected $colors(-selectfg)]
- set thickness 11.25p
ttk::style configure TScale \
-groovewidth 3p -troughrelief sunken \
- -sliderthickness $thickness -borderwidth 2
+ -sliderthickness 11.25p -borderwidth 2
ttk::style configure TProgressbar \
-background $colors(-selectbg) -borderwidth 0 \
- -barsize 22.5p -thickness $thickness
+ -barsize 22.5p -thickness 11.25p
}
-
- unset indMargin margins thickness
}
diff --git a/library/ttk/clamTheme.tcl b/library/ttk/clamTheme.tcl
index 91362d7..e399fb0 100644
--- a/library/ttk/clamTheme.tcl
+++ b/library/ttk/clamTheme.tcl
@@ -54,7 +54,7 @@ namespace eval ttk::theme::clam {
active $colors(-lighter)] \
-lightcolor [list pressed $colors(-darker)] \
-darkcolor [list pressed $colors(-darker)] \
- -bordercolor [list alternate "#000000"]
+ -bordercolor {alternate #000000}
ttk::style configure Toolbutton \
-anchor center -padding 1.5p -relief flat
@@ -99,8 +99,8 @@ namespace eval ttk::theme::clam {
ttk::style map TEntry \
-background [list readonly $colors(-frame)] \
-bordercolor [list focus $colors(-selectbg)] \
- -lightcolor [list focus "#6f9dc6"] \
- -darkcolor [list focus "#6f9dc6"]
+ -lightcolor {focus #6f9dc6} \
+ -darkcolor {focus #6f9dc6}
ttk::style configure TCombobox -padding 1 -insertwidth 1 \
-arrowsize 10.5p
@@ -121,7 +121,7 @@ namespace eval ttk::theme::clam {
ttk::style configure TNotebook.Tab -padding {4.5p 1.5p 4.5p 1.5p}
ttk::style map TNotebook.Tab \
- -padding [list selected {4.5p 3p 4.5p 1.5p}] \
+ -padding {selected {4.5p 3p 4.5p 1.5p}} \
-background [list selected $colors(-frame) {} $colors(-darker)] \
-lightcolor [list selected $colors(-lighter) {} $colors(-dark)]
@@ -142,15 +142,15 @@ namespace eval ttk::theme::clam {
-labeloutside true -labelmargins {0 0 0 3p} \
-borderwidth 2 -relief raised
- ttk::style configure TScrollbar -gripsize 7.5p -gripcount 3.75p \
+ ttk::style configure TScrollbar -gripsize 7.5p \
-arrowsize 10.5p -width 10.5p
- ttk::style configure TScale -gripsize 7.5p -gripcount 3.75p \
+ ttk::style configure TScale -gripsize 7.5p \
-arrowsize 10.5p -sliderlength 22.5p
ttk::style configure TProgressbar -background $colors(-frame) \
-arrowsize 10.5p -sliderlength 22.5p
- ttk::style configure Sash -sashthickness 4.5p -gripsize 15p -gripcount 7.5p
+ ttk::style configure Sash -sashthickness 4.5p -gripsize 15p
}
}
diff --git a/library/ttk/classicTheme.tcl b/library/ttk/classicTheme.tcl
index aae1743..da508e0 100644
--- a/library/ttk/classicTheme.tcl
+++ b/library/ttk/classicTheme.tcl
@@ -42,15 +42,14 @@ namespace eval ttk::theme::classic {
ttk::style map "." -foreground \
[list disabled $colors(-disabledfg)]
- ttk::style map "." -highlightcolor [list focus black]
+ ttk::style map "." -highlightcolor {focus black}
ttk::style configure TButton \
-anchor center -padding "3m 1m" -relief raised -shiftrelief 1
- ttk::style map TButton -relief [list {!disabled pressed} sunken]
+ ttk::style map TButton -relief {{!disabled pressed} sunken}
- set indMargin {0 1.5p 3p 1.5p}
ttk::style configure TCheckbutton -indicatorrelief raised \
- -indicatordiameter 9p -indicatormargin $indMargin
+ -indicatormargin {0 1.5p 3p 1.5p}
ttk::style map TCheckbutton \
-indicatorcolor [list \
pressed $colors(-frame) \
@@ -59,7 +58,7 @@ namespace eval ttk::theme::classic {
-indicatorrelief {alternate raised selected sunken pressed sunken}
ttk::style configure TRadiobutton -indicatorrelief raised \
- -indicatordiameter 9p -indicatormargin $indMargin
+ -indicatormargin {0 1.5p 3p 1.5p}
ttk::style map TRadiobutton \
-indicatorcolor [list \
pressed $colors(-frame) \
@@ -68,7 +67,7 @@ namespace eval ttk::theme::classic {
-indicatorrelief {alternate raised selected sunken pressed sunken}
ttk::style configure TMenubutton -relief raised \
- -indicatormargin {3.75p 0} -padding "3m 1m"
+ -indicatormargin {3.75p 0} -padding {3m 1m}
ttk::style configure TEntry -relief sunken -padding 1 -font TkTextFont
ttk::style map TEntry -fieldbackground \
@@ -90,13 +89,12 @@ namespace eval ttk::theme::classic {
-arrowsize 11.25p -width 11.25p
ttk::style map TScrollbar -relief {{pressed !disabled} sunken}
- set thickness 11.25p
ttk::style configure TScale -sliderrelief raised \
- -sliderlength 22.5p -sliderthickness $thickness
+ -sliderlength 22.5p -sliderthickness 11.25p
ttk::style map TScale -sliderrelief {{pressed !disabled} sunken}
ttk::style configure TProgressbar -background SteelBlue \
- -barsize 22.5p -thickness $thickness
+ -barsize 22.5p -thickness 11.25p
ttk::style configure TNotebook.Tab \
-padding {3m 1m} \
@@ -118,8 +116,7 @@ namespace eval ttk::theme::classic {
#
# Toolbar buttons:
#
- ttk::style configure Toolbutton -padding 1.5p -relief flat \
- -shiftrelief 2
+ ttk::style configure Toolbutton -padding 1.5p -relief flat -shiftrelief 2
ttk::style map Toolbutton -relief \
{disabled flat selected sunken pressed sunken active raised}
ttk::style map Toolbutton -background \
@@ -128,6 +125,4 @@ namespace eval ttk::theme::classic {
ttk::style configure Sash \
-sashthickness 4.5p -sashpad 1.5 -handlesize 6p -handlepad 6p
}
-
- unset indMargin thickness
}
diff --git a/library/ttk/defaults.tcl b/library/ttk/defaults.tcl
index 1fbd022..4a96e17 100644
--- a/library/ttk/defaults.tcl
+++ b/library/ttk/defaults.tcl
@@ -97,8 +97,7 @@ proc ttk::theme::default::reconfigureDefaultTheme {} {
-selectbackground $colors(-selectbg) \
-selectforeground $colors(-selectfg) \
-insertwidth 1 \
- -indicatordiameter 10 \
- ;
+ -indicatorsize 7.5p
ttk::style map "." -background \
[list disabled $colors(-frame) active $colors(-activebg)]
@@ -114,11 +113,9 @@ proc ttk::theme::default::reconfigureDefaultTheme {} {
-relief raised -shiftrelief 1
ttk::style map TButton -relief [list {!disabled pressed} sunken]
- set t 1.5p; set r 3p; set b $t
- set indMargin [list 0 $t $r $b]
ttk::style configure TCheckbutton \
-indicatorcolor $colors(-window) -indicatorrelief sunken \
- -indicatordiameter 7.5p -indicatormargin $indMargin -padding 0.75p
+ -indicatorsize 7.5p -indicatormargin {0 1.5p 3p 1.5p} -padding 0.75p
ttk::style map TCheckbutton -indicatorcolor \
[list pressed $colors(-activebg) \
{!disabled alternate} $colors(-altindicator) \
@@ -130,7 +127,7 @@ proc ttk::theme::default::reconfigureDefaultTheme {} {
ttk::style configure TRadiobutton \
-indicatorcolor $colors(-window) -indicatorrelief sunken \
- -indicatordiameter 7.5p -indicatormargin $indMargin -padding 0.75p
+ -indicatorsize 7.5p -indicatormargin {0 1.5p 3p 1.5p} -padding 0.75p
ttk::style map TRadiobutton -indicatorcolor \
[list pressed $colors(-activebg) \
{!disabled alternate} $colors(-altindicator) \
@@ -166,16 +163,15 @@ proc ttk::theme::default::reconfigureDefaultTheme {} {
ttk::style map TScrollbar \
-arrowcolor [list disabled $colors(-disabledfg) !disabled $colors(-text)]
- set thickness 11.25p
ttk::style configure TScale \
-sliderrelief raised \
-sliderlength 22.5p \
- -sliderthickness $thickness
+ -sliderthickness 11.25p
ttk::style configure TProgressbar \
-background $colors(-selectbg) \
-barsize 22.5p \
- -thickness $thickness
+ -thickness 11.25p
ttk::style configure TNotebook.Tab \
-padding {3p 1.5p} -background $colors(-darker)
@@ -186,15 +182,15 @@ proc ttk::theme::default::reconfigureDefaultTheme {} {
#
ttk::style configure Heading -font TkHeadingFont -relief raised
ttk::style configure Treeview \
- -background $colors(-window) \
- -stripedbackground $colors(-alternate) \
+ -background $colors(-window) \
+ -stripedbackground $colors(-alternate) \
-fieldbackground $colors(-window) \
-foreground $colors(-text) ;
ttk::style configure Treeview.Separator \
-background $colors(-alternate)
ttk::style map Treeview \
-background [list disabled $colors(-frame)\
- selected $colors(-selectbg)] \
+ selected $colors(-selectbg)] \
-foreground [list disabled $colors(-disabledfg) \
selected $colors(-selectfg)]
diff --git a/library/ttk/vistaTheme.tcl b/library/ttk/vistaTheme.tcl
index dbea7fb..288ec97 100644
--- a/library/ttk/vistaTheme.tcl
+++ b/library/ttk/vistaTheme.tcl
@@ -25,7 +25,7 @@ namespace eval ttk::theme::vista {
-font TkDefaultFont
ttk::style map "." \
- -foreground [list disabled SystemGrayText]
+ -foreground {disabled SystemGrayText}
ttk::style configure TButton -anchor center -padding 0.75p -width -11
ttk::style configure TRadiobutton -padding 1.5p
@@ -39,7 +39,7 @@ namespace eval ttk::theme::vista {
ttk::style configure TNotebook -tabmargins {1.5p 1.5p 1.5p 0}
ttk::style map TNotebook.Tab \
- -expand [list selected {1.5p 1.5p 1.5p 1.5p}]
+ -expand {selected {1.5p 1.5p 1.5p 1.5p}}
# Treeview:
ttk::style configure Heading -font TkHeadingFont
@@ -49,7 +49,7 @@ namespace eval ttk::theme::vista {
-background System3dLight
ttk::style map Treeview \
-background [list disabled SystemButtonFace \
- selected SystemHighlight] \
+ selected SystemHighlight] \
-foreground [list disabled SystemGrayText \
selected SystemHighlightText]
diff --git a/library/ttk/winTheme.tcl b/library/ttk/winTheme.tcl
index 77d556b..9fe65be 100644
--- a/library/ttk/winTheme.tcl
+++ b/library/ttk/winTheme.tcl
@@ -16,16 +16,15 @@ namespace eval ttk::theme::winnative {
-troughcolor SystemScrollbar \
-font TkDefaultFont
- ttk::style map "." -foreground [list disabled SystemGrayText]
- ttk::style map "." -embossed [list disabled 1]
+ ttk::style map "." -foreground {disabled SystemGrayText}
+ ttk::style map "." -embossed {disabled 1}
ttk::style configure TButton \
-anchor center -width -11 -relief raised -shiftrelief 1
ttk::style map TButton -relief {{!disabled pressed} sunken}
- set padding {1.5p 3p}
- ttk::style configure TCheckbutton -padding $padding
- ttk::style configure TRadiobutton -padding $padding
+ ttk::style configure TCheckbutton -padding {1.5p 3p}
+ ttk::style configure TRadiobutton -padding {1.5p 3p}
ttk::style configure TMenubutton \
-padding {6p 3p} -arrowsize 2.25p -relief raised
@@ -34,9 +33,9 @@ namespace eval ttk::theme::winnative {
-padding 2 -selectborderwidth 0 -insertwidth 1
ttk::style map TEntry \
-fieldbackground \
- [list readonly SystemButtonFace disabled SystemButtonFace] \
- -selectbackground [list !focus SystemWindow] \
- -selectforeground [list !focus SystemWindowText]
+ {readonly SystemButtonFace disabled SystemButtonFace} \
+ -selectbackground {!focus SystemWindow} \
+ -selectforeground {!focus SystemWindowText}
ttk::style configure TCombobox -padding 1.5p
ttk::style map TCombobox \
@@ -49,7 +48,7 @@ namespace eval ttk::theme::winnative {
disabled SystemGrayText \
{readonly focus} SystemHighlightText \
] \
- -focusfill [list {readonly focus} SystemHighlight]
+ -focusfill {{readonly focus} SystemHighlight}
ttk::style element create ComboboxPopdownFrame.border from default
ttk::style configure ComboboxPopdownFrame \
@@ -65,11 +64,9 @@ namespace eval ttk::theme::winnative {
ttk::style configure TScale -groovewidth 3p
- set margins {1.5p 1.5p 1.5p 0}
- ttk::style configure TNotebook -tabmargins $margins
- ttk::style configure TNotebook.Tab \
- -padding {2.25p 0.75p} -borderwidth 1
- ttk::style map TNotebook.Tab -expand [list selected $margins]
+ ttk::style configure TNotebook -tabmargins {1.5p 1.5p 1.5p 0}
+ ttk::style configure TNotebook.Tab -padding {2.25p 0.75p} -borderwidth 1
+ ttk::style map TNotebook.Tab -expand {selected {1.5p 1.5p 1.5p 0}}
# Treeview:
ttk::style configure Heading -font TkHeadingFont -relief raised
@@ -85,6 +82,4 @@ namespace eval ttk::theme::winnative {
-background SystemHighlight -borderwidth 0 \
-barsize 22.5p -thickness 11.25p
}
-
- unset padding margins
}
diff --git a/library/ttk/xpTheme.tcl b/library/ttk/xpTheme.tcl
index e265284..6b4e972 100644
--- a/library/ttk/xpTheme.tcl
+++ b/library/ttk/xpTheme.tcl
@@ -17,15 +17,14 @@ namespace eval ttk::theme::xpnative {
ttk::style map "." \
-foreground [list disabled SystemGrayText]
- ttk::style configure TButton -anchor center -padding 0.75p \
- -width -11
+ ttk::style configure TButton -anchor center -padding 0.75p -width -11
ttk::style configure TRadiobutton -padding 1.5p
ttk::style configure TCheckbutton -padding 1.5p
ttk::style configure TMenubutton -padding {6p 3p}
ttk::style configure TNotebook -tabmargins {1.5p 1.5p 1.5p 0}
ttk::style map TNotebook.Tab \
- -expand [list selected {1.5p 1.5p 1.5p 1.5p}]
+ -expand {selected {1.5p 1.5p 1.5p 1.5p}}
ttk::style configure TLabelframe.Label -foreground "#0046d5"