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

发布于 2024-09-26 08:55:45 字数 375 浏览 2 评论 0原文

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

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

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

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

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.

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.

I'm using windows XP, classic windows theme.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

一袭白衣梦中忆 2024-10-03 08:55:45

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

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

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

您几乎可以更改任何内容,问题是找出内容,并且事实上有些内容是您无法更改的位图(因此,如果位图是深色的,并且您设置了深色背景,您将“松开”位图)

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

== 非常晚添加 ==

您需要的所有内容都集中在一处,包括指向自定义深色主题的链接:< a href="http://mihai-nita.net/2013/09/19/dark-eclipse/" rel="noreferrer">http://mihai-nita.net/2013/09/19/dark-eclipse /

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

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

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:

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.html but they give you generic info on the widget names, not the Eclipse info (with IDs and all), so be careful :-)

== 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/

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

enter image description here

水溶 2024-10-03 08:55:45

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

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.

若水微香 2024-10-03 08:55:45

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

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.

苏璃陌 2024-10-03 08:55:45

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

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

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

Install the theme from here as per the instruction in the 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/

Combination of both just works like charm for me!

寒尘 2024-10-03 08:55:45

解决方法:

打开 e4-dark_partstyle.css。我的在这里:
“C:\sts-4.20.1.RELEASE\plugins\org.eclipse.ui.themes_1.2.2300.v20230807-1354\css\dark\e4-dark_partstyle.css”

您需要更改的css部分是“MPart Tree”
覆盖现有的 .MPart 树(选择深色背景颜色,在我的示例中显示两个选定的未选定的树元素 #004640)
(这是在线颜色查看器:https://www.color-hex.com/color/ 004640)。

只需在此文件中的默认 .MPart 树定义之后添加以下 css 部分(或简单地将其添加在末尾)

.MPart Tree
{ /* Section > DependenciesComposite$... */
    background-color: #004640;
    color: #AAAAAA;
}

在 Eclipse Preferences>General>Appearance>Colors And Fonts>Git 中,
以十进制格式为“未提交的更改(背景)”和“忽略的资源(背景)”添加相同的背景颜色(本示例中为十进制 0 70 64)
可以在 Eclipse Preferences>General>Appearance>“Colors And Fonts”中的“View and Editor Folders”中更改树字体大小。

注意:

  • 如果 eclipse 更新到新版本,您可能会看到新添加的 org.eclipse.ui.themes_xxx 文件夹作为更新的一部分。在这种情况下,您将需要在新的 e4-dark_partstyle.css 中重做更改。

其他一些有用的提示:

  • 对于较旧的 Eclipse 版本,可以在此处更改树字体:
    "C:\sts-3.7.3.RELEASE\plugins\org.eclipse.ui.themes_1.1.1.v20151026-1355\css\e4_default_win7.css"

添加以下行:

#org-eclipse-jdt-ui-PackageExplorer Tree,
#org-eclipse-ui-navigator-ProjectExplorer Tree {
    font-size: 11px; /* <-- Desired font size */
    /* font: Consolas;   <-- Font you want to have */
}

修改此 Eclipse 工作区文件:

“....metadata.plugins\org.eclipse.core.runtime.settings\com.github.eclipsecolortheme.prefs”

(ColorCode 是旧的 Eclipse 模式,我从现在开始使用已不存在的 http://eclipsecolorthemes.org/,其作者用户名是 joutos)

将您的主题添加到eclipsecolortheme.prefs 文件:

colorTheme=ColorCode
eclipse.preferences.version=1
importedColorTheme1=<colorTheme author\="Jeff Van Dorn" id\="358" modified\="2011-02-18 23\:28\:02" name\="chill time">\r\n    <searchResultIndication color\="\#616161"/>\r\n    <filteredSearchResultIndication color\="\#616161"/>\r\n    <occurrenceIndication color\="\#616161"/>\r\n    <writeOccurrenceIndication color\="\#616161"/>\r\n    <findScope color\="\#E0E2E4"/>\r\n    <deletionIndication color\="\#E0E2E4"/>\r\n    <sourceHoverBackground color\="\#FFFFFF"/>\r\n    <singleLineComment color\="\#7D8C93"/>\r\n    <multiLineComment color\="\#7D8C93"/>\r\n    <commentTaskTag color\="\#FF8BFF"/>\r\n    <javadoc color\="\#7D8C93"/>\r\n    <javadocLink color\="\#678CB1"/>\r\n    <javadocTag color\="\#E0E2E4"/>\r\n    <javadocKeyword color\="\#A082BD"/>\r\n    <class bold\="false" color\="\#99C0F9" strikethrough\="false" underline\="false"/>\r\n    <interface color\="\#99C0F9"/>\r\n    <method color\="\#99C0F9"/>\r\n    <methodDeclaration color\="\#E8E2B7"/>\r\n    <bracket color\="\#E8E2B7"/>\r\n    <number color\="\#F18511"/>\r\n    <string color\="\#C7D980"/>\r\n    <operator color\="\#E8E2B7"/>\r\n    <keyword bold\="false" color\="\#4DB84D"/>\r\n    <annotation color\="\#A082BD"/>\r\n    <staticMethod color\="\#E0E2E4"/>\r\n    <localVariable color\="\#E0E2E4"/>\r\n    <localVariableDeclaration color\="\#E0E2E4"/>\r\n    <field color\="\#99C0F9"/>\r\n    <staticField color\="\#99C0F9"/>\r\n    <staticFinalField color\="\#E0E2E4"/>\r\n    <deprecatedMember color\="\#E0E2E4" strikethrough\="true" underline\="false"/>\r\n    <enum color\="\#E0E2E4"/>\r\n    <inheritedMethod color\="\#E0E2E4"/>\r\n    <abstractMethod color\="\#E0E2E4"/>\r\n    <parameterVariable color\="\#E0E2E4"/>\r\n    <typeArgument color\="\#E0E2E4"/>\r\n    <typeParameter color\="\#E0E2E4"/>\r\n    <constant color\="\#A082BD"/>\r\n    <background color\="\#273B50"/>\r\n    <currentLine color\="\#4D4E50"/>\r\n    <foreground color\="\#FFFFFF"/>\r\n    <lineNumber color\="\#81969A"/>\r\n    <selectionBackground color\="\#804000"/>\r\n    <selectionForeground color\="\#E0E2E4"/>\r\n</colorTheme>
importedColorTheme2=<colorTheme author\="joutos" id\="1863" modified\="2015-02-09 14\:58\:29" name\="ColorCode">\r\n    <searchResultIndication color\="\#616161"/>\r\n    <filteredSearchResultIndication color\="\#616161"/>\r\n    <occurrenceIndication color\="\#616161"/>\r\n    <writeOccurrenceIndication color\="\#616161"/>\r\n    <findScope color\="\#B9B0B4"/>\r\n    <deletionIndication color\="\#FFFFFF"/>\r\n    <sourceHoverBackground color\="\#FFFFFF"/>\r\n    <singleLineComment color\="\#36AA70"/>\r\n    <multiLineComment color\="\#36AA70"/>\r\n    <commentTaskTag color\="\#7F9FBF" strikethrough\="false" underline\="false"/>\r\n    <javadoc color\="\#AEAED5" strikethrough\="false" underline\="false"/>\r\n    <javadocLink color\="\#8484FF" strikethrough\="false" underline\="false"/>\r\n    <javadocTag bold\="true" color\="\#A6BAF0"/>\r\n    <javadocKeyword color\="\#A082BD"/>\r\n    <class color\="\#FFFFFF"/>\r\n    <interface bold\="false" color\="\#FFFFFF"/>\r\n    <method bold\="false" color\="\#FFFFFF"/>\r\n    <methodDeclaration bold\="false" color\="\#FFFFFF"/>\r\n    <bracket color\="\#FFFFFF"/>\r\n    <number color\="\#FFFF00"/>\r\n    <string color\="\#FFA500"/>\r\n    <operator color\="\#FFFFFF"/>\r\n    <keyword bold\="true" color\="\#73E110"/>\r\n    <annotation color\="\#929292"/>\r\n    <staticMethod bold\="false" color\="\#FFFFFF" italic\="true" strikethrough\="false" underline\="false"/>\r\n    <localVariable color\="\#FFFFFF"/>\r\n    <localVariableDeclaration color\="\#FFFFFF"/>\r\n    <field color\="\#6FD1F2"/>\r\n    <staticField color\="\#6FD1F2" italic\="true"/>\r\n    <staticFinalField color\="\#FFFF9A" italic\="true"/>\r\n    <deprecatedMember color\="\#FFFFFF" strikethrough\="true" underline\="false"/>\r\n    <enum color\="\#FFFFFF"/>\r\n    <inheritedMethod color\="\#FFFFFF"/>\r\n    <abstractMethod color\="\#FFFFFF"/>\r\n    <parameterVariable color\="\#FFFFFF"/>\r\n    <typeArgument color\="\#FFFFFF"/>\r\n    <typeParameter color\="\#FFFFFF"/>\r\n    <constant color\="\#FFFF9A"/>\r\n    <background color\="\#373A3C"/>\r\n    <currentLine color\="\#4D4D4D"/>\r\n    <foreground color\="\#FFFFFF"/>\r\n    <lineNumber color\="\#787878"/>\r\n    <selectionBackground color\="\#949494"/>\r\n    <selectionForeground color\="\#FFFFFF"/>\r\n</colorTheme>

通过这种方式,您还可以为 java 编辑器创建自己的颜色模式。

注意:每次启动 Eclipse 后都应该重新应用以这种方式定义的模式(不幸的是 Eclipse 团队没有实现为此插件保存的编辑器模式)。但可以从 eclipse-color-theme 插件的 Prefs/General/Appearance/Color Theme 设置轻松恢复。

快乐编码。

Work-arround:

Open e4-dark_partstyle.css. Mine is here:
"C:\sts-4.20.1.RELEASE\plugins\org.eclipse.ui.themes_1.2.2300.v20230807-1354\css\dark\e4-dark_partstyle.css"

The css part you need to change is "MPart Tree"
Overwrite existing .MPart Tree (pick a dark background color that shows both selected unselected tree elements #004640 in my sample)
( Here is the online color viewer : https://www.color-hex.com/color/004640).

Just add the bellow css section in this file, after its default .MPart Tree definition (or simply add it at the end)

.MPart Tree
{ /* Section > DependenciesComposite$... */
    background-color: #004640;
    color: #AAAAAA;
}

In Eclipse Preferences>General>Appearance>Colors And Fonts>Git,
add the same background color for "Uncommited Change (Background)" and "Ignored Resource (Background)" in decimal format (Decimal 0 70 64 in this sample case)
Tree font size can be changed in "View and Editor Folders" from Eclipse Preferences>General>Appearance>"Colors And Fonts".

Note:

  • If eclipse is updated to a new version, you may see a new added org.eclipse.ui.themes_xxx folder as part of the update.In this case you will need to redo the changes in the new e4-dark_partstyle.css.

Some other useful tips:

  • For older eclipse versions, tree font can be changed here:
    "C:\sts-3.7.3.RELEASE\plugins\org.eclipse.ui.themes_1.1.1.v20151026-1355\css\e4_default_win7.css"

Add these lines:

#org-eclipse-jdt-ui-PackageExplorer Tree,
#org-eclipse-ui-navigator-ProjectExplorer Tree {
    font-size: 11px; /* <-- Desired font size */
    /* font: Consolas;   <-- Font you want to have */
}

Modify this eclipse workspace file:

"....metadata.plugins\org.eclipse.core.runtime.settings\com.github.eclipsecolortheme.prefs"

(ColorCode was am old eclipse schema that I used from now defunct http://eclipsecolorthemes.org/, its author user name was joutos)

Add your theme in eclipsecolortheme.prefs file:

colorTheme=ColorCode
eclipse.preferences.version=1
importedColorTheme1=<colorTheme author\="Jeff Van Dorn" id\="358" modified\="2011-02-18 23\:28\:02" name\="chill time">\r\n    <searchResultIndication color\="\#616161"/>\r\n    <filteredSearchResultIndication color\="\#616161"/>\r\n    <occurrenceIndication color\="\#616161"/>\r\n    <writeOccurrenceIndication color\="\#616161"/>\r\n    <findScope color\="\#E0E2E4"/>\r\n    <deletionIndication color\="\#E0E2E4"/>\r\n    <sourceHoverBackground color\="\#FFFFFF"/>\r\n    <singleLineComment color\="\#7D8C93"/>\r\n    <multiLineComment color\="\#7D8C93"/>\r\n    <commentTaskTag color\="\#FF8BFF"/>\r\n    <javadoc color\="\#7D8C93"/>\r\n    <javadocLink color\="\#678CB1"/>\r\n    <javadocTag color\="\#E0E2E4"/>\r\n    <javadocKeyword color\="\#A082BD"/>\r\n    <class bold\="false" color\="\#99C0F9" strikethrough\="false" underline\="false"/>\r\n    <interface color\="\#99C0F9"/>\r\n    <method color\="\#99C0F9"/>\r\n    <methodDeclaration color\="\#E8E2B7"/>\r\n    <bracket color\="\#E8E2B7"/>\r\n    <number color\="\#F18511"/>\r\n    <string color\="\#C7D980"/>\r\n    <operator color\="\#E8E2B7"/>\r\n    <keyword bold\="false" color\="\#4DB84D"/>\r\n    <annotation color\="\#A082BD"/>\r\n    <staticMethod color\="\#E0E2E4"/>\r\n    <localVariable color\="\#E0E2E4"/>\r\n    <localVariableDeclaration color\="\#E0E2E4"/>\r\n    <field color\="\#99C0F9"/>\r\n    <staticField color\="\#99C0F9"/>\r\n    <staticFinalField color\="\#E0E2E4"/>\r\n    <deprecatedMember color\="\#E0E2E4" strikethrough\="true" underline\="false"/>\r\n    <enum color\="\#E0E2E4"/>\r\n    <inheritedMethod color\="\#E0E2E4"/>\r\n    <abstractMethod color\="\#E0E2E4"/>\r\n    <parameterVariable color\="\#E0E2E4"/>\r\n    <typeArgument color\="\#E0E2E4"/>\r\n    <typeParameter color\="\#E0E2E4"/>\r\n    <constant color\="\#A082BD"/>\r\n    <background color\="\#273B50"/>\r\n    <currentLine color\="\#4D4E50"/>\r\n    <foreground color\="\#FFFFFF"/>\r\n    <lineNumber color\="\#81969A"/>\r\n    <selectionBackground color\="\#804000"/>\r\n    <selectionForeground color\="\#E0E2E4"/>\r\n</colorTheme>
importedColorTheme2=<colorTheme author\="joutos" id\="1863" modified\="2015-02-09 14\:58\:29" name\="ColorCode">\r\n    <searchResultIndication color\="\#616161"/>\r\n    <filteredSearchResultIndication color\="\#616161"/>\r\n    <occurrenceIndication color\="\#616161"/>\r\n    <writeOccurrenceIndication color\="\#616161"/>\r\n    <findScope color\="\#B9B0B4"/>\r\n    <deletionIndication color\="\#FFFFFF"/>\r\n    <sourceHoverBackground color\="\#FFFFFF"/>\r\n    <singleLineComment color\="\#36AA70"/>\r\n    <multiLineComment color\="\#36AA70"/>\r\n    <commentTaskTag color\="\#7F9FBF" strikethrough\="false" underline\="false"/>\r\n    <javadoc color\="\#AEAED5" strikethrough\="false" underline\="false"/>\r\n    <javadocLink color\="\#8484FF" strikethrough\="false" underline\="false"/>\r\n    <javadocTag bold\="true" color\="\#A6BAF0"/>\r\n    <javadocKeyword color\="\#A082BD"/>\r\n    <class color\="\#FFFFFF"/>\r\n    <interface bold\="false" color\="\#FFFFFF"/>\r\n    <method bold\="false" color\="\#FFFFFF"/>\r\n    <methodDeclaration bold\="false" color\="\#FFFFFF"/>\r\n    <bracket color\="\#FFFFFF"/>\r\n    <number color\="\#FFFF00"/>\r\n    <string color\="\#FFA500"/>\r\n    <operator color\="\#FFFFFF"/>\r\n    <keyword bold\="true" color\="\#73E110"/>\r\n    <annotation color\="\#929292"/>\r\n    <staticMethod bold\="false" color\="\#FFFFFF" italic\="true" strikethrough\="false" underline\="false"/>\r\n    <localVariable color\="\#FFFFFF"/>\r\n    <localVariableDeclaration color\="\#FFFFFF"/>\r\n    <field color\="\#6FD1F2"/>\r\n    <staticField color\="\#6FD1F2" italic\="true"/>\r\n    <staticFinalField color\="\#FFFF9A" italic\="true"/>\r\n    <deprecatedMember color\="\#FFFFFF" strikethrough\="true" underline\="false"/>\r\n    <enum color\="\#FFFFFF"/>\r\n    <inheritedMethod color\="\#FFFFFF"/>\r\n    <abstractMethod color\="\#FFFFFF"/>\r\n    <parameterVariable color\="\#FFFFFF"/>\r\n    <typeArgument color\="\#FFFFFF"/>\r\n    <typeParameter color\="\#FFFFFF"/>\r\n    <constant color\="\#FFFF9A"/>\r\n    <background color\="\#373A3C"/>\r\n    <currentLine color\="\#4D4D4D"/>\r\n    <foreground color\="\#FFFFFF"/>\r\n    <lineNumber color\="\#787878"/>\r\n    <selectionBackground color\="\#949494"/>\r\n    <selectionForeground color\="\#FFFFFF"/>\r\n</colorTheme>

In this way you can also create your own color schemas for java editor.

Note: a schema defined this way should be reapplied each time after you start eclipse (unfortunately eclipse team did not implement editor schemas save for this plugin). But can be reaplied easily from Prefs/General/Appearance/Color Theme settings for eclipse-color-theme plugin.

Happy Coding.

葬﹪忆之殇 2024-10-03 08:55:45

我不知道如何将每个 Eclipse 窗口更改为您的配色方案,但我至少可以帮助您更改一些编辑窗口...

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

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

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...

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)

情何以堪。 2024-10-03 08:55:45

遗憾的是,这是不可能的(这太疯狂了)。
然而,Aptana Studio(它是 Eclipse 的衍生产品)可以让您对整个 IDE 进行主题化。

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

橘味果▽酱 2024-10-03 08:55:45

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

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

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

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 :)

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文