Tk Source Code

View Ticket
Login
Ticket UUID: 2919709
Title: Windows menus don't honor Windows theme changes
Type: Bug Version: obsolete: 8.5.8
Submitter: flatworm Created on: 2009-12-23 00:07:00
Subsystem: 13. Win Menus Assigned To: tmh
Priority: 5 Medium Severity:
Status: Open Last Modified: 2009-12-23 21:39:15
Resolution: None Closed By:
    Closed on:
Description:
In Windows XP, when the system theme is changes, persistens menus (i.e. submenus of the main application menu) do not honor the change.

To demonstrate just select and apply some system theme having considerably darker or lighter colors than those of the currently active theme -- the background color of persistent pull-down menus will remain that of the old theme.

Pat Thoyts proposed that this can be caused by WM_SYSCOLORCHANGE message not being propagated to menus.
User Comments: patthoyts added on 2009-12-23 21:39:15:
It seems quite a lot about how menus get drawn is being cached for windows menu entries. This includes the font and the background color. A related issue is that windows menus do not track TkMenuFont changes although this font is updated when the system theme is changed.
The menubar does get the font change, and the border of the menu bar picks up the color change. But nothing else.
Unfortunately the menu code is pretty complex but it looks like the cached background gc needs to be invalidated and the font should be remembering the named font name and not {Tahoma 9}.