The original URL of this article is https://codeyarns.com/2014/11/03/how-to-set-font-and-font-size-of-eclipse-ui/

 Qestion: How to change the icon's color of three view? (That's the color of > before a item of project view.)

The font, font size and colors of most of the UI elements of Eclipse can be changed. Some of them can be set from inside Eclipse, others can be set in the CSS files used by the current Eclipse theme. There are other elements which can be changed only by modifying the settings of the current GTK or GNOME theme.

Inside Eclipse

Based on the current theme that Eclipse is using, many of the settings are in CSS files.

  • Font and fonts sizes of editor, console, dialog and other UI elements can be changed from Window -> Preferences -> General -> Appearance -> Colors and Fonts.

However, you will find that the font and font sizes of Project Explorer, Outline, Problems, Make and many other UI windows which hold tree-like elements cannot be changed from here. To do that you need to modify the CSS file of the theme you are current using. Here is how to do that:

  • Find out what is the current theme that Eclipse is using. You can see that in Window -> Preferences -> General -> Appearance. For example, I found that mine was using the theme GTK and the Color and Font theme was Default.
  • Go to the install directory of Eclipse and go to the themes CSS directory. For example, on my system this was 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. For example, for my theme I found the file e4_default_gtk.css.

  • Add this CSS style to change the font and font size. For example, to set to font Arial with size 8, I would add:

1
2
3
4
.MPart Tree {
    font-family: Consolas;
    font-size: 8;
}
  • Close the file. Close Eclipse and open it back again. You should be able to see the change in Project Explorer, Outline, and other windows that have tree-like UI elements.

Outside Eclipse

How to set font and colors of Eclipse UI的更多相关文章

  1. org.eclipse.ui.menus扩展点学习

    Eclipse菜单: menu:help?after=addtions menu:navigate?after=open.ext2 menu:window?after=newEditor menu:f ...

  2. rcp(插件开发)org.eclipse.ui.decorators 使用

    org.eclipse.ui.decorators这个扩展点可以为对应的节点添加不同的图标显示. 使用方式都差不多,以下就转载一下使用方式: 1.添加扩展点 org.eclipse.ui.decora ...

  3. JFace dailog button事件中刷新透视图异常 Trying to execute the disabled command org.eclipse.ui.window.closePerspective

    报错的代码为 protected void buttonPressed(int buttonId) { Display.getDefault().syncExec(new Runnable() { p ...

  4. Application "org.eclipse.ui.ide.workbench" could not be found in the registry.问题的解决

    今天升级Eclipse,升级完Restart,碰到启动不了让看日志,日志里主要错误信息即是Application "org.eclipse.ui.ide.workbench" co ...

  5. org.eclipse.ui.PartInitException: Unable to open editor, unknown editor ID: org.xmen.ui.text.XMLTextEditor

    无法打开struts模式的编译xml的编译器,然后打开.project文件,编辑最后一行,找到<natures>结点,增加一条<nature>com.genuitec.ecli ...

  6. Eclipse org.eclipse.compare plug-in

    Plug-in metedata tell eclipse runtime kernel how to create a expected object and set its perperties, ...

  7. eclipse修改中文注释的字体(亲测有用!)

    Window –> Preferences –> General –> Appearance –> Colors and Fonts –> Basic –> Tex ...

  8. Eclipse简单介绍

    1.编码设置:Windows>preference>Workspace>Other-UTF-8>apply and close: 2.字体大小设置:Windows>pre ...

  9. eclipse平台

    eclipse 是一个平台!!!! 能连ssh,能连db,能连windows Eclipse http://www.eclipse.org/downloads/packages/release/Neo ...

随机推荐

  1. word20161228

    1.principles英[p'rɪnsəplz]美[p'rɪnsəplz]n.原则; 原理; 准则; 道义; 节操; 原则( principle的名词复数 ); 工作原理; [P-] (基督教科学派 ...

  2. 解决ajax跨域的办法,代理,cors,jsonp

    1.使用php做代理去请求第三方api接口 php是可以跨域的,我们利用ajax请求本域名中的php文件,php再去请求第三方接口文件,从而达到跨域目的. php做代理请求: ajax请求本域名php ...

  3. jquery前端倒计时

    function FreshTime(){ // var endtime=new Date("2019/04/15,12:20:12");//结束时间 var endtime = ...

  4. OpenCV3编程入门读书笔记4-形态学滤波

    一.腐蚀和膨胀 1.腐蚀和膨胀的主要功能 (1)消除噪声 (2)分割出独立的图像元素,在图像中连接相邻的元素 (3)寻找图像中的极大值或者极小值区域 (4)求出图像的梯度 2.膨胀(dilate) 膨 ...

  5. 2017蓝桥杯第十题(k倍区间)

    #include<iostream> #include<stdio.h> using namespace std; ; ],a[N]; int lowbit(int n){ r ...

  6. 【原创】大叔经验分享(10)Could not transfer artifact org.apache.maven:maven. from/to central. Received fatal alert: protocol_version

    maven编译工程报错 [ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.2:add-source (s ...

  7. 【原创】大叔问题定位分享(21)spark执行insert overwrite非常慢,比hive还要慢

    最近把一些sql执行从hive改到spark,发现执行更慢,sql主要是一些insert overwrite操作,从执行计划看到,用到InsertIntoHiveTable spark-sql> ...

  8. php base64图片保存

    function base64_image_content($base64_image_content,$path){ //匹配出图片的格式 if (preg_match('/^(data:\s*im ...

  9. 软件工程课开学测试——根据已有的CSS模板资源,搭建整个系统

    日期:2019.2.28 博客期:038 星期四 今天的测试得到了9.5分,将将及格的程度吧!本次程序完成的很不成功! <%@ page language="java" co ...

  10. select获取选中的option(包含value和text,重点是text怎么获取)

    简单描述:后台需要获取到select标签选择的内容,也就是text,该怎么取呢?很简单. 代码: //hml代码<div class="col-md-6"> <l ...