Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
960 views
in Technique[技术] by (71.8m points)

ubuntu - How to change the highlight color in autocomplete box in Eclipse

I can't find a way to change the color of the highlighted selection in the autocomplete box in Eclipse.

enter image description here

As you can see from the screenshot white text on light gray background is not very readable.


Ubuntu 11.10 with Unity and Eclipse Classic


Update: This is system dependent, indeed. Changing the Ubuntu theme changes this color. There are settings about this in /usr/share/themes/Ambiance/, but I can't figure out which one. The background is a gradient, so picking the color and grepping for it does not work.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

it must be a system setting, try the Ubuntu control center (system settings) / appearance / customize. Click all the tabs and see which color matches the color in eclipse.

Update: I just realized that in ubuntu 11.04 for some weird reason the possibility to customize the colors was removed, you need to change the config files

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

in my version line 94 is

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

which you need to change as you wish, e.g.:

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

then you go to System settings / appearance, change the theme to something then change back to Ambience and voila, things are changed. I just can't imagine why there is no UI for changing this.

Update 2: this is slightly similar to what the other commenter suggested, just in a different file. I guess the difference is that will affect the system globally

UPDATE 2 :

in ubuntu 11.10 there is still no GUI to change the theme colors, but they also changed the file structure so exectute the following command (same as above)

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

and search for this section that controls tooltip colors :

style "tooltips" {
    bg[NORMAL]        = @tooltip_bg_color
    fg[NORMAL]        = @tooltip_fg_color
}

and alter is as you wish e.g.:

    bg[NORMAL]        = "#000000"
    fg[NORMAL]        = "#FFFFFF"

UPDATE 3 :

In ubuntu 12.04 you need to do both changes described in update 1 and update 2


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...