Message99457
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) |
|
Date |
User |
Action |
Args |
2010-02-17 02:01:53 | panzi | set | recipients:
+ panzi |
2010-02-17 02:01:53 | panzi | set | messageid: <1266372113.11.0.0197701157976.issue7949@psf.upfronthosting.co.za> |
2010-02-17 02:01:51 | panzi | link | issue7949 messages |
2010-02-17 02:01:50 | panzi | create | |
|