带有深色背景的 Eclipse EGit,仍然有黑色文本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26134001/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 22:03:12  来源:igfitidea点击:

Eclipse EGit with dark background, still has black text

eclipseegiteclipse-luna

提问by ecbrodie

My apologies if Stackoverflow was the incorrect Stackexchange site for this IDE-related question.

如果 Stackoverflow 是此 IDE 相关问题的不正确 Stackexchange 站点,我深表歉意

I am working on a project, which is shared with Git, on Eclipse Luna. As such, I rely on the EGitplugin for Git integration in the IDE (note that I have installed the latest version of EGit, 3.5). I prefer using dark colour themes in my IDEs, so I am using Moonrise UIand Eclipse Color Themesplugins to enable this behaviour.

我正在Eclipse Luna上开发一个与 Git 共享的项目。因此,我依赖EGit插件在 IDE 中进行 Git 集成(请注意,我已经安装了最新版本的 EGit,3.5)。我更喜欢在我的 IDE 中使用深色主题,所以我使用Moonrise UIEclipse Color Themes插件来启用这种行为。

It all works fine, my IDE is dark and colours within the toolbars and menu are not abnormal. However, there are still problems with the EGit colouring in my Package Explorer. The main issue is that certain text in the Package Explorer is now coloured black (this is being done on directories and files that have been edited). And this is against a black background. This makes it near impossible to see the text that is being coloured.

一切正常,我的 IDE 是深色的,工具栏和菜单中的颜色没有异常。但是,我的 Package Explorer 中的 EGit 着色仍然存在问题。主要问题是包资源管理器中的某些文本现在是黑色的(这是对已编辑的目录和文件进行的)。这是在黑色背景下进行的。这使得几乎不可能看到被着色的文本。

I know that I can change this colouring manually by going into Preferences --> General --> Appearance --> Colors And Fonts, select Git, and change all actions resulting in the colour black to be a different colour instead. However, I find this to be a little tedious and I thought that perhaps there is a more intuitive way to have these colours changed dynamically to make more sense against a dark background. I am also having these thoughts because this issue has already been reported as a bug in EGitthat should have been fixed by version 3.5.

我知道我可以通过进入首选项 --> 常规 --> 外观 --> 颜色和字体,选择 Git,然后将导致黑色的所有操作更改为不同的颜色来手动更改此颜色。但是,我觉得这有点乏味,我认为也许有一种更直观的方法可以动态更改这些颜色,以便在深色背景下更有意义。我也有这些想法,因为这个问题已经被报告为EGit中的一个错误,应该在 3.5 版中修复。

Any insight into this issue I'm facing is much appreciated.

对我面临的这个问题的任何见解都非常感谢。

回答by Rudge

You need to edit the Eclipse Theme. Go to Window -> Preferences -> Appearance > Colors and Fonts. Search by Uncommitted Change (Foreground), edit and choose your preferred color.

您需要编辑 Eclipse 主题。转到窗口 -> 首选项 -> 外观> 颜色和字体。按未提交的更改(前景)搜索,编辑并选择您喜欢的颜色。

回答by DenBrahe

I use regular Git which also gave black text. You can completely disable it in Preferences > Appearance > Label Decorations where you uncheck Git.

我使用普通的 Git,它也给出了黑色文本。您可以在 Preferences > Appearance > Label Decorations 中完全禁用它,您可以在其中取消选中 Git。

I don't think it is possible to disable Git text change but keep the '>' changes.

我认为不可能禁用 Git 文本更改但保留 '>' 更改。

回答by Chad Van De Hey

Instead of disabling the feature all-together you can keep Git decorators enabled and modify a few settings. You will still be able to see the theme's correct colors and there are only 2 things you must change:

您可以保持启用 Git 装饰器并修改一些设置,而不是完全禁用该功能。您仍然可以看到主题的正确颜色,您只需更改两件事:

  1. Go to Preferences -> General -> Appearance -> Colors and Fonts -> Git.
  2. Select "Uncommitted Change (Foreground)".
  3. Set to about 72% white on a black vs white slide bar.
  4. Select "Ignored Resource (Foreground)".
  5. Set to about 72% white on a black vs white slide bar.
  6. Click Apply and Okay.
  1. 转到首选项 -> 常规 -> 外观 -> 颜色和字体 -> Git。
  2. 选择“未提交的更改(前台)”。
  3. 在黑白滑动条上设置为大约 72% 的白色。
  4. 选择“忽略的资源(前台)”。
  5. 在黑白滑动条上设置为大约 72% 的白色。
  6. 单击应用和确定。

You should be good to go and will have the freedom to configure whatever colors you wish to show the "Ignored" fields and the "Uncommitted Change" fields.

您应该很高兴并且可以自由配置您希望显示“忽略”字段和“未提交的更改”字段的任何颜色。

We are developers here... Not feature killers...

我们是这里的开发人员......不是功能杀手......

回答by JxAxMxIxN

As long as all the other fonts and colors are to your liking in in Eclipse - go to...

只要所有其他字体和颜色都符合您在 Eclipse 中的喜好 - 转到...

Window -> Preferences -> General -> Appearance -> Label Decorations

Window -> Preferences -> General -> Appearance -> Label Decorations

Uncheck Git and why not SVN while you're at it.

取消选中 Git 以及为什么不选中 SVN。

This should clear everything up for EGit.

这应该为 EGit 清除一切。

You may also find that unchecking other items in this section will clear up other font/color issues you might have.

您可能还会发现取消选中本节中的其他项目将清除您可能遇到的其他字体/颜色问题。

回答by Pablo Santiago Sánchez

Use another tool for git management (like Sourcetree or even the cli git) and disconnect your project by right clicking on it, going to the Team menu and selecting "disconnect" from it. Works fine for me that way, since I'm used to use the cli git.

使用另一个 git 管理工具(如 Sourcetree 甚至 cli git)并通过右键单击它来断开您的项目,转到“团队”菜单并从中选择“断开连接”。这样对我来说很好用,因为我习惯使用 cli git。