diff options
author | culler <culler> | 2020-11-17 22:26:10 (GMT) |
---|---|---|
committer | culler <culler> | 2020-11-17 22:26:10 (GMT) |
commit | 517cab46b3a8d51a7a7c35be459168dadf549cd8 (patch) | |
tree | 1fb1e4b7d07814ff304922513734133482b3081f /library/demos | |
parent | 9d94caca32ae897acbb3fb2e32f97f8cb81f2de8 (diff) | |
download | tk-517cab46b3a8d51a7a7c35be459168dadf549cd8.zip tk-517cab46b3a8d51a7a7c35be459168dadf549cd8.tar.gz tk-517cab46b3a8d51a7a7c35be459168dadf549cd8.tar.bz2 |
Make the menu demo look like the old one, by using -foreground instead of -background in aqua.
Diffstat (limited to 'library/demos')
-rw-r--r-- | library/demos/menu.tcl | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/library/demos/menu.tcl b/library/demos/menu.tcl index 6989523..56a29da 100644 --- a/library/demos/menu.tcl +++ b/library/demos/menu.tcl @@ -144,9 +144,17 @@ $m entryconfigure "Does almost nothing" -bitmap questhead -compound left \ set m $w.menu.colors $w.menu add cascade -label "Colors" -menu $m -underline 1 menu $m -tearoff 1 -foreach i {red orange yellow green blue} { - $m add command -label $i -background $i -command [list \ - puts "You invoked \"$i\"" ] +if {[tk windowingsystem] eq "aqua"} { + # In aqua, changing the background actually adds a colored underline. + foreach i {red orange yellow green blue} { + $m add command -label $i -foreground $i -command [list \ + puts "You invoked \"$i\"" ] + } +} else { + foreach i {red orange yellow green blue} { + $m add command -label $i -background $i -command [list \ + puts "You invoked \"$i\"" ] + } } $w configure -menu $w.menu |