Change Eclipse Tooltip's Color in Ubuntu

时间:2023-03-09 06:32:10
Change  Eclipse Tooltip's Color in Ubuntu

这个问题十分高级,随着Ubuntu版本的变迁这个问题的解决方案也在不断变化

最开始,SystemSettings里面可以设置工具条背景色,后来这个选项在新版本Ubuntu中消失了

我用过Ubuntu14.04,它用的是GTK2.0,配置文件的是gtkrc

我现在用Ubuntu15.10,它用的是GTK3.0,配置文件大都是.css格式的

==========方案一:直接设置eclipse========

Change  Eclipse Tooltip's Color in Ubuntu

==============方案二:设置主题==================

1.Good resource

*
askubuntu
weblog :This is really a good passage!

2.Steps

If you want to apply your change to all the applications,modify "/usr/share/themes/Ambian/gtk-2.0/gtkrc":

  change 'gtk-color-scheme=...fg_color=#000000...bg_color=#f5f5f5'

If you just want to apply change to eclipse,edit one file with a random name.For example,I write a file '~/Desktop/style' whose contents is this:

  style "my-tooltips"
  {
    bg[NORMAL] = "#f5f5f5"
    fg[NORMAL] = "#000000"
  }
  widget "gtk-tooltip*" style "my-tooltips"
Then you can start eclipse with this style.Press 'Ctrl+Alt+T' to open terminal,input the command below:

  GTK2_RC_FILES=style eclipse

Now you will see everything change !  

3.Optimizaton

If you always start eclipse in terminal,just put this cmd above into global(There are many ways to accomplish this).

If you want to start eclipse by clicking the icon in the laungcher,edit the file "/usr/share/applications/eclipse.desktop"

change the 'exec' as your own cmd.

Actually you can create your own laungchers here.

5.My method

/usr/local/bin/eclipse-style

  style "haha"
  {
    bg[NORMAL] = "#f5f5b5"
    fg[NORMAL] = "#000000"
  }
  widget "gtk-tooltip*" style "haha"

/usr/local/bin/ec

  #!/bin/bash
  GTK2_RC_FILES=/usr/local/bin/eclipse-style eclipse

/usr/share/applications/eclipse.desktop

  Change one line:  
  Exec=ec