After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 591186 - GTK Menu Bar is unreadable under Windows 7
GTK Menu Bar is unreadable under Windows 7
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.16.x
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-08-08 22:20 UTC by Tomasz Sałaciński
Modified: 2010-02-07 09:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot (3.85 KB, image/png)
2009-08-14 13:14 UTC, Tomasz Sałaciński
  Details
Bug shown on Windows 7rc1 GTK 2.16.4 with theme MS-Windows (21.24 KB, image/png)
2009-10-24 21:34 UTC, Andrew Ziem
  Details
Appearance is normal on Vista with GTK+ 2.16.4 (12.56 KB, image/png)
2009-10-24 21:36 UTC, Andrew Ziem
  Details
Patch against modules/engines/ms-windows/msw_style.c that fixes the problem (665 bytes, patch)
2010-02-06 15:59 UTC, Steffen Macke
none Details | Review

Description Tomasz Sałaciński 2009-08-08 22:20:20 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.
Comment 1 Tomasz Sałaciński 2009-08-08 22:22:50 UTC
Here's a screenshot:

http://alarm-clock.pl/gtk-win7.png
Comment 2 Paolo Borelli 2009-08-14 10:08:55 UTC
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
Comment 3 Tomasz Sałaciński 2009-08-14 13:14:17 UTC
Created attachment 140771 [details]
Screenshot
Comment 4 Andrew Ziem 2009-10-24 21:33:35 UTC
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.
Comment 5 Andrew Ziem 2009-10-24 21:34:42 UTC
Created attachment 146184 [details]
Bug shown on Windows 7rc1 GTK 2.16.4 with theme MS-Windows
Comment 6 Andrew Ziem 2009-10-24 21:36:00 UTC
Created attachment 146185 [details]
Appearance is normal on Vista with GTK+ 2.16.4
Comment 7 Tor Lillqvist 2009-10-25 10:52:59 UTC
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.
Comment 8 Steffen Macke 2010-01-31 17:57:27 UTC
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?
Comment 9 Dominic Lachowicz 2010-01-31 18:50:01 UTC
No, because it overrides all of the .gtkrc colors with Windows' colors.
Comment 10 Steffen Macke 2010-02-06 15:59:51 UTC
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.
Comment 11 Tor Lillqvist 2010-02-07 09:18:23 UTC
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.