Program sub menus dark gray on black, thus illegible

When using a program, for example Libre Writer, when I click on file, open, then in the Open menu box I have the opportunity to change the file type from "All files" to a specific file type, when I click on "All files" the selection list appears. The font color for the different file types is a dark grey on a black background making the list items illegible. As I move the cursor, the font color and background change to "normal" black on a white background but only for the item that the cursor is hovering over at that moment. This makes the rest of the list impossible to read and moving the cursor slowly down the list, pausing to read each item, is a very cumbersome way to get things done.

This doesn't just happen on Libre Writer but also Inkscape, Geeqie, and a variety of other programs and their sub menus. The only program I could find where this didn't happen was Firefox (58.02). Furthermore this happens on 3 different machines, each with a different processor, different graphics card and where the machine has multiple monitors, it happens on all monitors.

All machines are running 16.04, one with the latest updates, the others slightly behind on updates. Is this a bug or a "feature". Haha. What is going on? Is this fixable? How?


Below appears to be a minimal change which fixes these pop-up menus.

  • As a backup, make a copy of file /usr/share/themes/Ambiance/gtk-2.0/gtkrc :

    cp /usr/share/themes/Ambiance/gtk-2.0/gtkrc ~/Documents/gtkrc
    
  • Using sudo, edit the file /usr/share/themes/Ambiance/gtk-2.0/gtkrc :

    sudo vi /usr/share/themes/Ambiance/gtk-2.0/gtkrc
    
  • Go to (around) line 346 (346G) which should read:

    style "menu" = "dark" {
    
  • Remove this: = "dark"

  • The line should now look like this:

    style "menu" {
    
  • Save your changes (ZZ)

  • Open the Systems Settings app

  • Go to the Appearance section

  • Change the theme from Ambiance to something else, and then back again to Ambiance (this will refresh your theme)

Tested under Ubuntu 16.04. The exact line to change may vary depending on what patch level you have. A safer way of finding the line to change is to search for style "menu" = "dark" in the file. In vi this would be: /style "menu" = "dark"


Before the change:

Inkscape menu


After the change:

Inkscape after change