[New-bugs-announce] [issue7949] idle does not handle dark gtk color schemes

Mathias Panzenböck report at bugs.python.org
Wed Feb 17 03:01:53 CET 2010

New submission from Mathias Panzenböck <grosser.meister.morti at gmx.net>:

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:

in ToolTipBase.showcontents():

in ListboxToolTip.showcontents():

in idlelib/AutoCompleteWindow.py:
   from ToolTip import set_tooltip_bg

in AutoCompleteWindow.show_window():

in idlelib/CallTipWindow.py:
   from ToolTip import set_tooltip_bg

in CallTip.showtip():

components: IDLE
files: idlelib.zip
messages: 99457
nosy: panzi
severity: normal
status: open
title: idle does not handle dark gtk color schemes
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file16240/idlelib.zip

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list