From 517cab46b3a8d51a7a7c35be459168dadf549cd8 Mon Sep 17 00:00:00 2001 From: culler Date: Tue, 17 Nov 2020 22:26:10 +0000 Subject: Make the menu demo look like the old one, by using -foreground instead of -background in aqua. --- library/demos/menu.tcl | 14 +++++++++++--- 1 file 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 -- cgit v0.12