diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-10-28 11:30:52 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-10-28 11:30:52 (GMT) |
commit | 092d80cd9917db82ff38157d7ec77518a8cfc29a (patch) | |
tree | ec41ebb5568d6e71200ea8b0e6889eab46d3f8b9 /library/palette.tcl | |
parent | 9cadb68de9b2d449705705970edd4703fddf14cf (diff) | |
download | tk-092d80cd9917db82ff38157d7ec77518a8cfc29a.zip tk-092d80cd9917db82ff38157d7ec77518a8cfc29a.tar.gz tk-092d80cd9917db82ff38157d7ec77518a8cfc29a.tar.bz2 |
TIP #645 correction. Latest patch from Patrick May.
Diffstat (limited to 'library/palette.tcl')
-rw-r--r-- | library/palette.tcl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/library/palette.tcl b/library/palette.tcl index c9b1208..8cea657 100644 --- a/library/palette.tcl +++ b/library/palette.tcl @@ -71,6 +71,20 @@ proc ::tk_setPalette {args} { if {![info exists new(highlightBackground)]} { set new(highlightBackground) $new(background) } + # 'buttonBackground' is the background color of the buttons in + # the spinbox widget. + if {![info exists new(buttonBackground)]} { + set new(buttonBackground) $new(background) + } + # 'selectColor' is the background of check & radio buttons. + if {![info exists new(selectColor)]} { + foreach {r g b} $bg {break} + if {$r+1.5*$g+0.5*$b > 100000} { + set new(selectColor) white + } else { + set new(selectColor) black + } + } if {![info exists new(activeBackground)]} { # Pick a default active background that islighter than the # normal background. To do this, round each color component |