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

Posted: 6 June 2011 by Robert Hutton in HOWTOs
Tags: , , , , , , , , , , , , , ,

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 focused, 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!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s