GNOME Bugzilla – Bug 591186
GTK Menu Bar is unreadable under Windows 7
Last modified: 2010-02-07 09:18:23 UTC
Please describe the problem: Hello, I am writing an application and I want this application to work on Windows too. I am using Python and GTK 2.16. Everything works fine except menu bar - when menu item is selected, the text inside appears white (mixed with light blue selection color makes it unreadable). This doesn't happen on GTK 2.14 as Pidgin is working fine. One of the affected apps is Glade editor working under Win32 and using GTK 2.16. I am using Windows 7, can't check with Vista. I can tell that under Windows XP this works very well. Steps to reproduce: 1. Install GTK 2.16 2. Run GTK app 3. Watch the menu bar Actual results: Menu bar selection text is white Expected results: Menu bar selection text should remain black Does this happen every time? Yes Other information: This doesn't happen with other than Windows themes and it works properly with 2.14.
Here's a screenshot: http://alarm-clock.pl/gtk-win7.png
the image is not reachable, can you attach it instad of using a link? Moving to win32 component so that they right people see it
Created attachment 140771 [details] Screenshot
I confirm the bug on Windows 7 release candidate 1 with GTK+ 2.16.4 and theme MS-Windows. However, Vista looks fine. I'll attach screenshots for W7 and Vista.
Created attachment 146184 [details] Bug shown on Windows 7rc1 GTK 2.16.4 with theme MS-Windows
Created attachment 146185 [details] Appearance is normal on Vista with GTK+ 2.16.4
Note that in GTK+ 2.18, which is the current maintained stable branch of GTK+, the whole XP-and-later theming stuff is entirely disabled in the ms-windows theme engine because it doesn't work... see bug #598299. So one won't presumably see the problem this bug describes in GTK+ 2.18. There will be no more (source) releases of GTK+ 2.16 but if somebody comes up with a trivial fix for the problem in this bug, and if people insist, I *might* consider building new Windows binaries of GTK+ 2.16.6 with that fix (and possibly some other fixes, like the recent one for #599321) added.
Shouldn't it be possible to overcome this problem in .gtkrc? I tried this, but failed. Doesn't libwimp.dll allow to set the menu font color in .gtkrc?
No, because it overrides all of the .gtkrc colors with Windows' colors.
Created attachment 153143 [details] [review] Patch against modules/engines/ms-windows/msw_style.c that fixes the problem The attached patch against GTK+ 2.16.6 fixes the problem. Tested with Windows 2000, XP, Vista and 7.
Patch pushed to gtk-2-16 and master branches. Will push to gtk-2-18 branch, too, after I have finished some other hacking there.