Eclipse 的包资源管理器背景颜色遵循 Windows 主题。我想在不更改 Windows 主题的情况下更改颜色。可能的?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3866471/
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-10 19:39:54  来源:igfitidea点击:

Eclipse's Package explorer background color follows windows theme. I want to change the color without changing windows' theme. Possible?

eclipsewindows-xpthemeswindows-themes

提问by navand

Maybe a way to alter the colors locally (as in application dependant)?

也许是一种在本地改变颜色的方法(如依赖于应用程序)?

A background color of eclipse is white, the same white of windows' active window background color. If I change the color on the theme, eclipse changes to the color.

eclipse 的背景色是白色,与windows 的活动窗口背景色相同的白色。如果我更改主题的颜色,eclipse 会更改颜色。

I want to change this software's color without changing the whole theme (because then every program gets weird colors). Is this possible? I thought that maybe there was a way to apply different windows themes to different programs, or something.

我想改变这个软件的颜色而不改变整个主题(因为每个程序都会得到奇怪的颜色)。这可能吗?我想也许有一种方法可以将不同的 Windows 主题应用于不同的程序,或者其他什么。

I'm using windows XP, classic windows theme.

我正在使用 Windows XP,经典的 Windows 主题。

采纳答案by Matthias Kempka

Knowing the way the workbench is built, I'm sure your request is not possible on the Eclipse side. You can do this for the editors, because they are StyledText widgets, and you are exposed some preferences to customize these. The other views are various widgets, some are Trees, some are Text, some are composed from various other widgets. All of them are created with the default constructor which just uses the Windows theme.

了解工作台的构建方式后,我确信您的请求在 Eclipse 端是不可能的。您可以为编辑器执行此操作,因为它们是 StyledText 小部件,并且您可以使用一些首选项来自定义这些小部件。其他视图是各种小部件,有些是树,有些是文本,有些是由各种其他小部件组成的。它们都是使用仅使用 Windows 主题的默认构造函数创建的。

回答by Mihai Nita

Install the "Eclipse 4 Chrome Theme" from http://marketplace.eclipse.org/content/eclipse-4-chrome-theme

http://marketplace.eclipse.org/content/eclipse-4-chrome-theme安装“Eclipse 4 Chrome 主题”

Then you can customize a lot of the Eclipse UI widgets. But not what you want, at least not out of the box. For that you should go to the CSS tab (in Eclipse 4 Chrome Theme) and paste this:

然后您可以自定义许多 Eclipse UI 小部件。但不是你想要的,至少不是开箱即用的。为此,您应该转到 CSS 选项卡(在 Eclipse 4 Chrome 主题中)并粘贴以下内容:

Tree, List, Table {
  background-color: #202020;
  color: #d0d0d0;
}

You can change almost anything, the problem is finding out what, and the fact that some things are bitmaps that you can't change (so if the bitmap is dark and you set a dark background you will "loose" the bitmap)

你几乎可以改变任何东西,问题是找出什么,以及一些东西是你不能改变的位图的事实(所以如果位图是黑色的并且你设置了一个黑色的背景,你会“松开”位图)

This list of widgets might help, http://download.eclipse.org/rt/rap/doc/1.5/help/html/reference/theming/index.htmlbut they give you generic info on the widget names, not the Eclipse info (with IDs and all), so be careful :-)

这个小部件列表可能会有所帮助,http://download.eclipse.org/rt/rap/doc/1.5/help/html/reference/theming/index.html但它们为您提供了小部件名称的通用信息,而不是 Eclipse信息(带有 ID 和所有信息),所以要小心 :-)

== Very late addition ==

==很晚才加入==

Everything you need in one place, including links to a custom dark theme: http://mihai-nita.net/2013/09/19/dark-eclipse/

您在一个地方需要的一切,包括指向自定义黑暗主题的链接:http: //mihai-nita.net/2013/09/19/dark-eclipse/

Mac Screen Shot Example as of Sept 2013 (please be sure to restart Eclipse after changing file):

截至 2013 年 9 月的 Mac 屏幕截图示例(请务必在更改文件后重新启动 Eclipse):

enter image description here

在此处输入图片说明

回答by user3273530

Just search "Theme" in the Eclipse Market Place. Install Moonrise. (Should be first option). Then go to the General, appearance, Click on appearance, change theme to moonrise, Then there you go.

只需在 Eclipse Market Place 中搜索“Theme”即可。安装月出。(应该是第一选择)。然后转到General,外观,单击外观,将主题更改为moonrise,然后就可以了。

回答by Tal Weiss

Sadly, this is not possible (which is crazy).
However, Aptana Studio(which is an Eclipse derivative) lets you theme the entire IDE.

可悲的是,这是不可能的(这很疯狂)。
但是,Aptana Studio(它是 Eclipse 的衍生产品)允许您为整个 IDE 设置主题。

回答by Gordon

I don't know of a way to change every Eclipse window to your color scheme, but I can get you at least as far as changing some of the editing windows...

我不知道有什么方法可以将每个 Eclipse 窗口更改为您的配色方案,但我至少可以帮助您更改某些编辑窗口...

Open up "Window -> Preferences", then under "General | Editors | Text Editors" you will find a section that will allow you to set the "Appearance color options", Background color is one of those options.

打开“窗口 -> 首选项”,然后在“常规 | 编辑器 | 文本编辑器”下,您将找到一个允许您设置“外观颜色选项”的部分,背景颜色是这些选项之一。

PS: I'm using Eclipse 3.6 (Helios)

PS:我使用的是 Eclipse 3.6 (Helios)

回答by Waras

I did some research and found that actualy it is posible to change all colors, but abit harder. there are two methods that I found so far.

我做了一些研究,发现实际上可以改变所有颜色,但有点难。到目前为止,我发现了两种方法。

first since eclipse is using OS themes, you can change your OS background settings, like folder background etc., or just change the whole theme if your using windows, but the downside is that all windowses will be same color, in linux and mac os it is also posible, but in different way, I did read it somewhere, but can't remember where :)

首先,因为 Eclipse 使用的是操作系统主题,所以您可以更改操作系统背景设置,例如文件夹背景等,或者如果您使用的是 Windows,则只需更改整个主题,但缺点是所有 Windows 在 linux 和 mac os 中都是相同的颜色它也是可能的,但以不同的方式,我确实在某处读过它,但不记得在哪里:)

second creating a specific theme for eclipse, for example http://rogerdudler.github.io/eclipse-ui-themes/or any other theme like google chrome etc.

其次为 Eclipse 创建一个特定的主题,例如http://rogerdudler.github.io/eclipse-ui-themes/或任何其他主题,如 google chrome 等。

回答by Sean

Install the theme from here as per the instruction in the github: https:// github.com/guari/eclipse-ui-theme

按照github中的说明从这里安装主题:https://github.com/guari/eclipse-ui-theme

If you don't like the editor color theme, there are bunch of 'em here http://eclipsecolorthemes.org/

如果你不喜欢编辑器颜色主题,这里有很多 http://eclipsecolorthemes.org/

Combination of both just works like charm for me!

两者的结合对我来说就像魅力一样!