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

眉间皱痕 提交于 2021-01-27 05:51:37

问题


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?


回答1:


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;
}


来源:https://stackoverflow.com/questions/28714333/on-eclipse-java-ee-how-do-i-change-the-color-settings-for-selected-elements-on

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!