使用 CSS 设计 Eclipse 工具栏的样式
Styling an Eclipse Toolbar Using CSS
我想使用 CSS 为我们的 Eclipse 应用程序的 ToolBar
设置样式:
<extension id="product" point="org.eclipse.core.runtime.products">
<product application="org.acme.application" name="Application">
<!-- other stuff -->
<property name="cssTheme" value="ourtheme" />
</product>
</extension>
<extension point="org.eclipse.e4.ui.css.swt.theme">
<theme basestylesheeturi="branding/theme.css"
id="ourtheme"
label="Our Theme">
</extension>
一切正常(即 background-color: COLOR-WHITE
使工具栏变白)。但是我正在努力寻找允许的 CSS 标签。
The Eclipse GIT Repo 有几个 CSS 文件,它们具有以下工具栏键:
#org-eclipse-ui-main-toolbar {
background-image: url(./winXPOlive.png);
eclipse-perspective-keyline-color: #585858;
background-color: #515658 #515658 100%;
handle-image: none;
color: #EBE8E4;
}
或者说全部?某处有全面的手册吗?还是 CSS 样式是在反复试验的基础上?
(如果需要特定用例:我想向工具项添加填充,和/或某种边框。)
我不知道有没有列出所有内容的手册。
所有 CSS 属性都是使用 org.eclipse.e4.ui.css.core.propertyHandler
扩展点定义的,因此使用 Eclipse 插件搜索将显示所有定义。其中大部分在 org.eclipse.e4.ui.css.swt
插件中,还有一些在其他插件中。
定义如下:
<extension
point="org.eclipse.e4.ui.css.core.propertyHandler">
<handler
adapter="org.eclipse.e4.ui.css.swt.dom.ControlElement"
composite="true"
handler="org.eclipse.e4.ui.css.swt.properties.css2.CSSPropertyBackgroundSWTHandler">
<property-name
name="background">
</property-name>
<property-name
name="background-color">
</property-name>
<property-name
name="background-image">
</property-name>
</handler>
adapter
是由 org.eclipse.e4.ui.css.core.elementProvider
扩展点定义的,它的命名通常是为了很好地说明 属性 适用于什么 - 此中的任何 Control
案例.
您还可以查看 handler
class 以确切了解属性是如何处理的。
我想使用 CSS 为我们的 Eclipse 应用程序的 ToolBar
设置样式:
<extension id="product" point="org.eclipse.core.runtime.products">
<product application="org.acme.application" name="Application">
<!-- other stuff -->
<property name="cssTheme" value="ourtheme" />
</product>
</extension>
<extension point="org.eclipse.e4.ui.css.swt.theme">
<theme basestylesheeturi="branding/theme.css"
id="ourtheme"
label="Our Theme">
</extension>
一切正常(即 background-color: COLOR-WHITE
使工具栏变白)。但是我正在努力寻找允许的 CSS 标签。
The Eclipse GIT Repo 有几个 CSS 文件,它们具有以下工具栏键:
#org-eclipse-ui-main-toolbar {
background-image: url(./winXPOlive.png);
eclipse-perspective-keyline-color: #585858;
background-color: #515658 #515658 100%;
handle-image: none;
color: #EBE8E4;
}
或者说全部?某处有全面的手册吗?还是 CSS 样式是在反复试验的基础上?
(如果需要特定用例:我想向工具项添加填充,和/或某种边框。)
我不知道有没有列出所有内容的手册。
所有 CSS 属性都是使用 org.eclipse.e4.ui.css.core.propertyHandler
扩展点定义的,因此使用 Eclipse 插件搜索将显示所有定义。其中大部分在 org.eclipse.e4.ui.css.swt
插件中,还有一些在其他插件中。
定义如下:
<extension
point="org.eclipse.e4.ui.css.core.propertyHandler">
<handler
adapter="org.eclipse.e4.ui.css.swt.dom.ControlElement"
composite="true"
handler="org.eclipse.e4.ui.css.swt.properties.css2.CSSPropertyBackgroundSWTHandler">
<property-name
name="background">
</property-name>
<property-name
name="background-color">
</property-name>
<property-name
name="background-image">
</property-name>
</handler>
adapter
是由 org.eclipse.e4.ui.css.core.elementProvider
扩展点定义的,它的命名通常是为了很好地说明 属性 适用于什么 - 此中的任何 Control
案例.
您还可以查看 handler
class 以确切了解属性是如何处理的。