Search code examples
gtkgtk2

How do I change the color of GTK's "Dropdown"?


I am just trying to tweak my GTK Theme to have a dark background color and light foreground color for Menu, Panel, Menu Bar.

However, I have a problem with "Dropdowns" which has a dark background color, and a dark background!

It seems to be taking the background of the clearlooks-menu and foreground of the clearlooks-default which seems to be an incorrect combination. How do I correct this?

GTK Dropdown

I have been checking the Wiki but it is a bit confusing.


Solution

  • This has to do with widget_class "*.<GtkComboBox>.<GtkCellView>"

    In my case the below setting solved the issue:

    widget_class "*.<GtkComboBox>.<GtkCellView>"   style "clearlooks-text-is-fg-color-workaround"
    
    style "clearlooks-menuitem-text-is-fg-color-workaround"
    {
      text[NORMAL]        = "#ffffff"
      text[PRELIGHT]      = @selected_fg_color
      text[SELECTED]      = @selected_fg_color
      text[ACTIVE]        = @fg_color
      text[INSENSITIVE]   = darker (@bg_color)
    }