Tk Library Source Code

View Ticket
Login
Ticket UUID: 3105665
Title: bwidget menu white on white
Type: Bug Version: None
Submitter: ssmedley Created on: 2010-11-09 01:21:41
Subsystem: bwidget 1.x Assigned To: oehhar
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2010-11-09 23:01:53
Resolution: Fixed Closed By: oehhar
    Closed on: 2010-11-09 16:01:53
Description:
Using BWidget v1.8.0 or v1.9.2 on Mac OS X 10.6.4, menu item text is white, on a white background! & only visible when the mouse cursor highlights the menu item. Key accelerators are in black however, & therefore visible.
User Comments: oehhar added on 2010-11-09 23:01:53:
Commited Kevins patch to trunk and tag bwidget.
Thank you all !
Harald

wordtech added on 2010-11-09 21:43:55:
It appears that mainframe.tcl in the BWidget source tree sets the background of Tk menus by checking for $tcl_platform(platform), and assigning traits if the platform returns "unix."  It really should use [tk windowingsystem], because while tcl_platform(platform) returns unix on MacOSX, the UI framework is not X11. 

The diff below appears to fix the problem:


--- mainframe-orig.tcl2010-11-09 09:36:05.000000000 -0500
+++ mainframe.tcl2010-11-09 09:36:49.000000000 -0500
@@ -518,7 +518,7 @@
 }
     }
 
-    if {![Widget::theme] && $tcl_platform(platform) == "unix"} {
+    if {![Widget::theme] && $tcl_platform(platform) == "unix" && [tk windowingsystem] !="aqua"} {
 set menuopts [list -background [Widget::getoption $path -background] \
   -borderwidth 1]
     } else {

oehhar added on 2010-11-09 15:04:54:
Thank you for the bug report and the test script.
Could you please post your tcl version (and source).
Does it only happen for the menu item with purple background or for all of them ?

Thank you,
Harald

ssmedley added on 2010-11-09 08:21:41:

File Added - 392646: t.tcl

Attachments: