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. 简单使用Markdown

    Markdown是一种纯文本格式的标记语言.通过简单的标记语法,它可以使普通文本内容具有一定的格式. 相比WYSIWYG编辑器 优点: 1.因为是纯文本,所以只要支持Markdown的地方都能获得一样 ...

  2. nginx+tomcat:动静分离+https

    nginx server { listen 80; server_name 192.168.0.103; # http访问重写为https rewrite ^ https:/$http_host$re ...

  3. nohup + & 保证服务后台运行不中断

    nohup和&后台运行,进程查看及终止   1.nohup 用途:不挂断地运行命令. 语法:nohup Command [ Arg … ] [ & ] 无论是否将 nohup 命令的输 ...

  4. poj3126 Prime Path 广搜bfs

    题目: The ministers of the cabinet were quite upset by the message from the Chief of Security stating ...

  5. vue路由懒加载

    大项目中,为了提高初始化页面的效率,路由一般使用懒加载模式,一共三种实现方式.(1)第一种写法: component: (resolve) => require(['@/components/O ...

  6. 抽象业务mapper

    1.抽象业务代码 package com.xingyunliushui.dao; import java.util.List; public interface BaseQueryMapper { & ...

  7. python数据类型小测试

    # 1. 有两个列表,其中一个列表a,每一项映射到另一个列表b每一项,先对a排序,要求b的中映射关系位置保持不变,给b也按照排序, (b的8对应a的[1,2], 7对应[3,4] ... ) a = ...

  8. Vue前端利用qrcode生成二维码

    <div id="qrcode" style="width: 560px;height: 560px;background-color: white;"& ...

  9. sql防止注入

    使用PreparedStatement的参数化的查询可以阻止大部分的SQL注入.在使用参数化查询的情况下,数据库系统不会将参数的内容视为SQL指令的一部分来处理,而是在数据库完成SQL指令的编译后,才 ...

  10. python-nmap的函数学习

    简介 python-nmap是一个使用nmap进行端口扫描的python库,它可以很轻易的生成nmap扫描报告,并且可以帮助系统管理员进行自动化扫描任务和生成报告.同时,它也支持nmap脚本输出. 可 ...