在Eclipse-Java EE上,如何更改树视图中所选元素的颜色设置? [英] On Eclipse-Java EE, how do I change the color settings for selected elements on a tree view?

查看:53
本文介绍了在Eclipse-Java EE上,如何更改树视图中所选元素的颜色设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在Eclipse Java EE Luna上切换到了深色主题,甚至尝试了其他深色主题,例如Moonrise,但是我总是最终不得不调整一些设置以便能够读取内容(顺便说一下)每次重启Eclipse时,我都必须重新设置一次,希望他们尽快修复该故障单!)

但是,我不知道如何解决最烦人的问题.在某些视图(例如导航器视图)上,我可以正确读取所选项目:

虽然在其他人(例如程序包浏览器,搜索和服务器视图)上,这却是我得到的:

如您所见,所选项目的文本很难阅读.

据我了解,我无法通过编辑配置设置来解决此问题,而是必须打开CSS主题文件并编辑一个或多个属性.只有我不知道必须编辑哪一个.有任何线索吗?

解决方案

您可以更改视图中项目的颜色.为此,请导航至 eclipse/plugins/org.eclipse.ui.themes_x.xx .../css 并打开 e4-dark_win.css 文件(如果使用的是视窗).找到 CTabFolder树,CTabFolder画布 .MPartStack.active树,.MPartStack.active CTabFolder画布定义,然后将 color 更改为更令人愉快的内容./p>

例如

  CTabFolder树,CTabFolder画布{背景颜色:#2F2F2F;颜色:#ffffaa;}.MPartStack.active树,.MPartStack.active CTabFolder画布{背景颜色:#262626;颜色:#ffffaa;} 

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:

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

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?

解决方案

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

这篇关于在Eclipse-Java EE上,如何更改树视图中所选元素的颜色设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆