Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have taken a look at Gtk Theme change menu bar hover color but it doesn't seem to work on 12.04, nor can I find those lines in 12.04.

My menus look like the below when hovered over for some applications such as Eclipse, Pidgin, LibreOffice etc.

enter image description here

enter image description here

Where as it looks much better on Nautilus and a few others.

enter image description here

How to change the text colour on hover to white?

Edit:

I use Cinnamon with Ambiance theme

share|improve this question
    
@vasa1 Agreed, added details now. –  adarshr Sep 13 '12 at 12:01
add comment

1 Answer

up vote 1 down vote accepted

I'm trying to answer this although I don't use Cinnamon. I'm running Xfce 4.10 on Ubuntu 12.04.

I can edit the theme's gtkrc file (in the gtk-2.0 folder) in two ways.

First, I can enhance contrast between text and background by modifying bg[SELECTED]: the example uses "yellow" instead of selected_bg_color.

style "menu"

{

ythickness = 3

xthickness = 0

GtkMenuBar :: shadow-type = GTK_SHADOW_NONE

bg[SELECTED] = "yellow" #@selected_bg_color

bg[NORMAL] = shade (1.18, @bg_color)

bg[PRELIGHT] = @selected_bg_color

bg[ACTIVE] = shade (1.18, @bg_color)

bg[INSENSITIVE] = shade (1.18, @bg_color)

fg[NORMAL] = @fg_color

fg[PRELIGHT] = @base_color

fg[SELECTED] = @base_color

fg[ACTIVE] = @base_color

The result is here:

modified background

Alternatively, I can enhance contrast by modifying fg[PRELIGHT]: the next example uses "green" instead of base_color.

style "menu"

{

ythickness = 3

xthickness = 0

GtkMenuBar :: shadow-type = GTK_SHADOW_NONE

bg[SELECTED] = @selected_bg_color

bg[NORMAL] = shade (1.18, @bg_color)

bg[PRELIGHT] = @selected_bg_color

bg[ACTIVE] = shade (1.18, @bg_color)

bg[INSENSITIVE] = shade (1.18, @bg_color)

fg[NORMAL] = @fg_color

fg[PRELIGHT] = "green" #@base_color

fg[SELECTED] = @base_color

fg[ACTIVE] = @base_color

Modified text

If you prefer the same colors as used by your current theme, you could consider using shade to brighten or darken text or background. Higher values brighten, lower values darken.

share|improve this answer
    
That was it! I added fg[PRELIGHT] = "white" to style "menu" and the menus look much better now. Thanks a lot. –  adarshr Sep 14 '12 at 10:05
    
There's a little bit more... You can make the change you want to the theme system-wide (in /usr/share/themes/Ambiance) or after making a copy of it in ~/.themes/Ambiance. In the latter case, the change won't be lost when the theme is updated. –  user25656 Sep 14 '12 at 10:17
    
Makes sense. I have made quite a few changes at /usr/share/themes/Ambiance already. Better back it up before I lose it later. Also, following the same technique I even changed the scrollbar colours. It now looks clearly distinguishable. –  adarshr Sep 14 '12 at 11:21
    
Sorry, I forgot to mention that I rename the theme to MyAmbiance when I move it over to ~/.themes. –  user25656 Sep 14 '12 at 12:28
    
Yes, I concur... –  adarshr Sep 14 '12 at 13:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.