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. websocket 与Socket.IO介绍

    一  websocket WebSocket是html5新增加的一种通信协议,目前流行的浏览器都支持这个协议,例如 Chrome,Safrie,Firefox,Opera,IE等等,对该协议支持最早的 ...

  2. 分布式系列四: HTTP及HTTPS协议

    分布式系列四: HTTP及HTTPS协议 非常全面的一篇HTTP的文章: 关于HTTP协议,一篇就够了 还有一个帮助理解HTTPS的文章: 也许,这样理解HTTPS更容易 本文的一些描述摘自这篇文章 ...

  3. php的phar是什么?

    phar 要求5.2以上 前言 最近在看composer,是下载了一个composer.phar,然后放到/usr/local/bin目录下,就可以全局使用composer了,然而并不懂phar是什么 ...

  4. Selenium Navigation

    Navigating Navigate a link with WebDriver: driver.get("http://www.google.com") 1.Interacti ...

  5. 帆软报表(finereport)图表——扇形图/等弧度的玫瑰图

    扇形图/等弧度的玫瑰图,展示的是展示数据所占的比例,需要所有数据的和加起来为1. 下面利用一个实例说明玫瑰图的用法和设置起始角度和终止角度,操作如下: 1.配置一个内置数据集 新增一个等弧度的玫瑰图模 ...

  6. c4b和c4f的区别

    1. cc.c4b的参数直接填rgba的值. 2 .cc.c4f(r,g,b,透明度),把rgb值填进去,会发现颜色不对,需要把rgb值除以255,所以最终转换公式是: cc.c3b(r,g,b) = ...

  7. 安装和启动tftp-server服务器及可能出现Redirecting to /bin/systemctl restart xinetd.service问题的解决方式

    安装和启动tftp-server服务器及可能出现Redirecting to /bin/systemctl restart xinetd.service问题的解决方式 1)首先,检查服务器已安装的tf ...

  8. ubuntu服务器上提示 To run a command as administrator (user "root"), use "sudo <command>". See " 解决方案

    原因是你执行命令必须要在root用户下执行.其他用户权限不够.运行  sudo -s 切换到root用户下就可以了

  9. Unable to find header files

    在本模块导出头文件时,可以使用如下方式: LOCAL_EXPORT_C_INCLUDE_DIRS := $(MY_DIRECTORY_PATH) LOCAL_EXPORT_C_INCLUDES := ...

  10. shaderlab UV动画所需的变量声明

    优化资源.美术需要迫使自己的顶点shader能够进行TRANSFORM_TEX运算,进行该运算的前提是需要声明一个 _MainTex_ST 变量,类型为float4即可. 此时就可以使用unity c ...