Apache OpenOffice (AOO) Bugzilla – Issue 103999
OpenOffice.org doesn't inherit GTK colours properly
Last modified: 2017-05-20 10:23:51 UTC
OpenOffice.org doesn't inherit GTK colours properly. OOo doesn't inherit the text[NORMAL] gtk colour for the menu bar/item text colour as it should. Especially noticeable in dark themes, OOo renders is as dark text on a dark background.
Version 1.0.0?
I couldn't select an other version number. It happens in 3.x.
Currently the menu text color is taken from fg[NORMAL]. That is probably wrong ?
pl: yes, it needs to inherit the text[NORMAL] colour.
Isn't the problem more that OOo uses the same text color both for menubar and menu? Or is this a different problem? If the GTK theme uses a dark background color and light text for menubars, and a light background and dark text for menus, the menubar text is not visible in OOo. To fix this problem, I came up with a patch that adds a separate MenuBarTextColor field, and setters and getters for it, to the classes in question, and then use that for menubar text, and set it appropriately in the gtk+ theme sniffing code in OOo.
If there are themes that do use different text colors for menubars, then an additional entry in Settings would indeed be the solution for that.
Created attachment 64239 [details] Tentative patch
The above patch is for the (separate) issue I mention. Note that the patch also contains a heuristic hack to fix a third issue, related to menu separators (look for "Awful hack"), that part you don't necessarily want. Patch is for ooo310-m18, but afaik the affected code in dev300-m* is mostly the same?
great patch ! I'll commit it to CWS vcl104 if you don't mind. The only other change necessary would be using text instead of fg, right ? About the "awful hack": that doesn't seem so awful, but we'll probably want that checked on different themes :-) Especially since it influences the borders of other controls than the menus.
committed in CWS vcl104; however the mentioned sonar theme does not seem to use different text colors for menubar and menu. I also changed getting the text colors from the text gc instead of fg.
No, it's the Moblin theme that uses different colours for menu bar and menu items. Thanks!
verified in CWS vcl104
integrated
This issue is also apparent in Ubuntu 9.10 OpenOffice 3.1.1 (build:9420) with any theme that uses a dark menu background color. Earlier versions of OpenOffice (Ubuntu 9.04 OpenOffice v3.0) does not have this issue.
Unfortunately it seems that the change to my patch that pl mentions below on "Tue Aug 18 15:11:08 +0000 2009" made the menu bar entries invisible in a theme with a dark menu bar background with light menu bar entries. Reverting it back to aTextColor = getColor( pMenubarStyle->fg[GTK_STATE_NORMAL] ); aStyleSet.SetMenuBarTextColor( aTextColor ); seems to help and has no visible bad effect on other themes as far as I can see.
The only two "white on dark" themes I have (Sonar and High Contrast Inverse) do not show a problem - with or without the change to "fg" instead of "text" GC. Can you please give me a reference to a theme where the problem occurs ?
The theme in question is "Moblin Netbook", available in a package called moblin-gtk-engine in some distros. It uses a theme engine, so I guess you need to build the theme engine from sources, just using the gtkrc file won't be enough. Will attach the src.rpm.
Created attachment 69126 [details] Source RPM for the theme and its engine
Ok, with that theme I see the problem. Reopening issue.
change the menubar text color back to "fg" instead of "text" in CWS vcl111
and just changed the menu text color back to "fg" also, since I noticed the same problem here in the "Dark Room" theme on Ubuntu.
please verify in CWS vcl111
There are other similar issues to this, or maybe they end up falling under this as well? For example this picture of Base with a dark theme in Ubuntu. http://launchpadlibrarian.net/43513269/Screenshot.png Notice the section titles are dark grey on black (or extremely dark grey) which makes it nearly impossible to read. Should I file a separate bug about this?
Verified in CWS vcl111.