更改 Eclipse 侧边栏垂直范围突出显示 [英] Change Eclipse sidebar vertical scope highlighting
问题描述
我在 Windows 8 上使用 Eclipse 一段时间后才安装了 Ubuntu.我唯一不知道如何修改的是当您在文件中的当前类或方法下工作时垂直条的颜色.
I just installed Ubuntu after using Eclipse on Windows 8 for some time. The only thing I can't figure out how to modify is the color of the vertical bar when you're working under a current class or method in a file.
示例:在 Windows 中,默认是这种可爱的蓝色,如下所示:
Example: in Windows the default was this lovely blue as shown below:
但在 Ubuntu 中,这是橙色(如下所示),这让我分心:
But in Ubuntu this is orange in color (as shown below) which distracts me:
知道如何解决这个问题吗?
不知道为什么颜色不一样?我在 Windows 8 和 Ubuntu 14.04 上的 Eclipse 都是 Kepler 4.3
Any idea on how I can fix this?
Not sure why the colors are different? My Eclipse on Windows 8 and Ubuntu 14.04 are both Kepler 4.3
推荐答案
这称为范围指示器.您可以关闭范围指示器.
This is called as Range indicator.You can switch off the range indicator.
点击 Windows >首选项
.导航到 General >编辑 >文本编辑器
.取消选择显示范围指示器
选项.
Click Windows > Preferences
. Navigate to General > Editors > Text Editors
. De select Show Range indicator
option.
范围指示器的颜色由操作系统控制,而不是由 eclipse 控制.
Color of range indicator is controlled by OS not by eclipse.
- 从 Ubuntu 软件中心安装
gtk-theme-config
工具.更改突出显示背景颜色
.注销并重新登录.
- Install
gtk-theme-config
tool from Ubuntu software centre. Change theHighlight background color
. Logout and login again.
- 您也可以通过将 dconf-editor 安装为 在这里说
更改后:
请注意,这将更改其他应用程序中的选择颜色,例如 nautilus、Firefox 等.
Note that this will change the selection colour in other applications also like nautilus, Firefox etc.
在您的主目录中的某处,创建一个 gtkrc 文件(如:~/.gtkrc-eclipse),内容如下:
Somewhere on your home directory, create a gtkrc file (like: ~/.gtkrc-eclipse) with following content:
gtk-color-scheme = "selected_bg_color:#0AFC02
selected_fg_color:#FFFFFF
orginal_selected_bg_color:#f07746
tooltip_bg_color:#f5f5c5
tooltip_fg_color:#000000"
style "range-indicator"
{
base[SELECTED] = @selected_bg_color
}
class "GtkWindow" style "range-indicator"
<小时>
从命令行启动 Eclipse,如
Launch eclipse from command line like,
env GTK2_RC_FILES=/usr/share/themes/<您当前的主题>/gtk-2.0/gtkrc:/home/<用户名>/.gtkrc-eclipse '
env GTK2_RC_FILES=/usr/share/themes/Ambiance/gtk-2.0/gtkrc:/home/chandrayya/.gtkrc-eclipse '/opt/eclipse-3.3/eclipse'
env GTK2_RC_FILES=/usr/share/themes/<Your current theme>/gtk-2.0/gtkrc:/home/<user name>/.gtkrc-eclipse '
env GTK2_RC_FILES=/usr/share/themes/Ambiance/gtk-2.0/gtkrc:/home/chandrayya/.gtkrc-eclipse '/opt/eclipse-3.3/eclipse'
您可以通过执行找到您当前的主题,
You can find out your current theme by executing,
gsettings 获取 org.gnome.desktop.interface gtk-theme
gsettings get org.gnome.desktop.interface gtk-theme
请注意,编辑器中的文本选择背景和前景色也会发生变化,我们无法避免.
这篇关于更改 Eclipse 侧边栏垂直范围突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!