This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author panzi
Recipients panzi
Date 2010-02-17.02:01:50
SpamBayes Score 4.7190284e-08
Marked as misclassified No
Message-id <1266372113.11.0.0197701157976.issue7949@psf.upfronthosting.co.za>
In-reply-to
Content
Idle sets *some* colors to hardcoded values and uses the system defaults for other colors. This is extremely bad when you use a dark gtk color scheme and now a almost white text (system text color) is displayed on a white background (idle tooltip background color).

There are two solutions to the problem: Also set the foreground color to a hardcoded value or better detect whether the foreground color is bright or dark and choose an appropriate background color. I've implemented the latter for the idle that comes with fedora 12 (2.6.2). I forgot to backup the original files so I can't make a diff/patch. However, I attached the changed files and here is a summary of my changes:

in idlelib/ToolTip.py:
added functions:
   parse_color(color)
   set_tooltip_bg(widget)

in ToolTipBase.showcontents():
   set_tooltip_bg(label)

in ListboxToolTip.showcontents():
   set_tooltip_bg(listbox)

in idlelib/AutoCompleteWindow.py:
added:
   from ToolTip import set_tooltip_bg

in AutoCompleteWindow.show_window():
   set_tooltip_bg(listbox)

in idlelib/CallTipWindow.py:
added:
   from ToolTip import set_tooltip_bg

in CallTip.showtip():
   set_tooltip_bg(self.label)
History
Date User Action Args
2010-02-17 02:01:53panzisetrecipients: + panzi
2010-02-17 02:01:53panzisetmessageid: <1266372113.11.0.0197701157976.issue7949@psf.upfronthosting.co.za>
2010-02-17 02:01:51panzilinkissue7949 messages
2010-02-17 02:01:50panzicreate