Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

On Eclipse-Java EE, how do I change the color settings for selected elements on a tree view?

I've recently switched to the dark theme on Eclipse Java EE Luna, even tried other dark themes such as moonrise, but I always end up having to tune some settings in order to be able to read things (which by the way I have to set up again every time I restart eclipse, I hope they fix that ticket soon!)

However, I couldn't figure out how to fix the most annoying problem. On some views, such as Navigator view I can read the selected item properly: enter image description here

On others though (such as package explorer, search, and servers views), this is what I get:

enter image description here

As you can see the selected item text is quite difficult to read.

It's my understanding I cannot fix this by editing a config setting, but instead I have to open the CSS theme file and edit the property or properties. Only I don't know which one or which ones I have to edit. Any clues?

like image 963
NotGaeL Avatar asked Nov 01 '22 09:11

NotGaeL


1 Answers

You can change the color of items in the views. To do that navigate to eclipse/plugins/org.eclipse.ui.themes_x.x.x..../css and open e4-dark_win.css file (if you are using windows). Find CTabFolder Tree, CTabFolder Canvas and .MPartStack.active Tree, .MPartStack.active CTabFolder Canvas definitions and change color to something more pleasing.

E.g.

CTabFolder Tree, CTabFolder Canvas {
    background-color: #2F2F2F;
    color: #ffffaa;
}
.MPartStack.active Tree,
.MPartStack.active CTabFolder Canvas {
    background-color: #262626;
    color: #ffffaa;
}
like image 82
Aleksandr M Avatar answered Nov 12 '22 18:11

Aleksandr M