简体   繁体   English

在Eclipse视图窗格中更改选择突出显示颜色

[英]change selection highlight color in eclipse view pane

I recently switched to the Moonrise UI theme, and like it for the most part, except that I find it hard to read highlighted lines in view panels (Package Explorer, Search, Servers, etc). 我最近切换到Moonrise UI主题,并且在很大程度上喜欢它,除了我发现很难在视图面板(包资源管理器,搜索,服务器等)中读取突出显示的行。

After looking all over, I haven't found the correct setting to change these. 环顾四周后,我没有找到正确的设置来更改这些设置。 Also, there are 2 colors here - active and inactive. 另外,这里有2种颜色-有效和无效。 (Examples below) (以下示例)

I could settle for either changing the text color on highlight, or the color of the highlight itself. 我可以选择更改突出显示上的文本颜色或突出显示本身的颜色。

Active 活性

活动亮点

Inactive 不活跃

无效的突出显示

You need to modify the CSS file of the them you are currently using. 您需要修改当前使用的CSS文件。

For example if the theme you are using was GTK and the Color and Font theme was Default. 例如,如果您使用的主题是GTK,而“颜色和字体”主题是“默认”。 Go to the install directory of Eclipse and go to the themes CSS directory. 转到Eclipse的安装目录,然后转到主题CSS目录。 For example: 例如:

plugins/org.eclipse.ui.themes_1.0.1.v20140819-1717/css. plugins / org.eclipse.ui.themes_1.0.1.v20140819-1717 / css。

Open the CSS file that corresponds to the theme that Eclipse is currently using. 打开与Eclipse当前使用的主题相对应的CSS文件。 For example, the file e4_default_gtk.css. 例如,文件e4_default_gtk.css。

Add this CSS style to change the font, font colour and font size. 添加此CSS样式以更改字体,字体颜色和字体大小。 For example, to set to font Arial with color blue and size 8, I would add: 例如,要设置为Arial字体,颜色为蓝色,大小为8,我会添加:

    .MPart Tree {
    font-family: Consolas;
    font-size: 8;
    color: blue;
    }

Close the file. 关闭文件。 Close Eclipse and open it back again. 关闭Eclipse,然后再次将其打开。 You should be able to see the change in Project Explorer, Outline, and other windows that have tree-like UI elements. 您应该能够在Project Explorer,Outline和其他具有树状UI元素的窗口中看到更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM