Ubuntu’s Ambiance: selected items in unfocused windows are invisible

I have a confession to make: I really like Ubuntu’s design, its look and feel, and its colour scheme.  And it seems to get better with each release.  The new Natty theme is really beautiful, and the dark window decorations of the Ambiance theme are great (especially now that they’ve chased down the odd dark text on dark background problems).

Having said that, there’s one thing that I really don’t like: the way that it’s virtually impossible to tell what you have selected in windows other than the one that happens to be focused.  This is because the focused elements get completely desaturated, like this:

Which items are selected? It's anyone's guess!

For comparison, here’s the same window when it has focus:

We can see what's selected... so long as the window has focus.

This is a particular problem when you have two windows containing elements that you’d like to compare.  If you select these elements, and try to compare them by eye, you’ll often not be able to tell which one you selected in the unfocused window. 🙁

So I set out to change this by fiddling with the arcane theme files.  The one you need to change is:

/usr/share/themes/Ambiance/gtk-2.0/gtkrc

So, the way I did it was to add a new colour for my elements.  Line 1:

gtk-color-scheme = "base_color:#ffffff\nfg_color:#4c4c4c\ntooltip_fg_color:#ffffff\nselected_bg_color:#f07746\nselected_fg_color:#FFFFFF\ntext_color:#3C3C3C\nbg_color:#F2F1F0\ntooltip_bg_color:#000000\nlink_color:#DD4814"

becomes:

gtk-color-scheme = "base_color:#ffffff\nfg_color:#4c4c4c\ntooltip_fg_color:#ffffff\nselected_bg_color:#f07746\nselected_fg_color:#FFFFFF\ntext_color:#3C3C3C\nbg_color:#F2F1F0\ntooltip_bg_color:#000000\nlink_color:#DD4814\ntest-color:#f5d8b1"

Note the addition of the “\ntest-color:#f5d8b1” at the end of the line. Next, we change the elements we want to that colour.  A bit of trial and error here and I found which one.  Line 93 was:



base[ACTIVE]      = shade (0.94, @bg_color)

and becomes:

base[ACTIVE]      = @test-color

Voila!  Our unfocused window now looks much better:

Now we can tell exactly what's selected, and it even fits in nicely with the theme.

Now just open up the Appearance application, switch to a different theme, then back to Ambiance to load the changes, and enjoy!

This entry was posted in HOWTOs and tagged , , , , , , , , , , , , , , . Bookmark the permalink.

4 Responses to Ubuntu’s Ambiance: selected items in unfocused windows are invisible

  1. klokop says:

    Even easier, change
    base[ACTIVE] = shade (0.94, @bg_color)
    to
    base[ACTIVE] = shade (1.4, @selected_bg_color)

  2. rwh says:

    Thanks, klkop, that is simpler. I personally prefer shade (1.5, @selected_bg_color) or even still using my solution as it gives a slightly different shade of orange (with less red in it). But each to their own! 😉

    Note also that I had to reapply this change after the upgrade to 11.10 Oneiric Ocelot. It now applies only to GTK2 applications (like Thunderbird), but GTK3 apps don’t seem to exhibit this problem anyway.

  3. rwh says:

    This still applies to Ubuntu 12.04 Precise Pangolin. The main GTK2 app that I still use every day and exhibits this problem is Thunderbird.

  4. Trevor Bradley says:

    Thanks for this, the non-selected highlighting in geany was driving me bonkers.

Leave a Reply

Your email address will not be published. Required fields are marked *