Community
Participate
Working Groups
The ability to use values from the underlying operating system's theme will permit for greater fidelity with the desktop. It would be handy to be able to specify CSS 2.1-type things along the lines of: .MPartStack { font: Caption; background-color: HighlightText; } Overview: http://www.sitepoint.com/css-system-styles/ CSS 2.1 Fonts: http://www.w3.org/TR/CSS2/fonts.html#font-shorthand CSS 2.1 System Colors: http://www.w3.org/TR/CSS2/ui.html#system-colors
for the time being to at least get the Tab-Coloring right on Linux with Classic-Theme we should set a renderer on the CTabFolder which derives the color from the system to make it look like 3.x
Created attachment 218778 [details] patch v1 Exposing system colours is easy. I've attached a first cut at to map SWT's system colors to CSS 2.1 system colors. For example, you could use: #org-eclipse-ui-views-ContentOutline { background: Highlight; } #org-eclipse-jdt-ui-PackageExplorer { background: InfoBackground; } (InfoBackground matches the tooltip backgrounds.) I wasn't sure how to map the following CSS 2.1 system colors: ActiveBorder, AppWorkspace, Background, ButtonFace, ButtonHighlight, ButtonShadow, ButtonText, Menu, MenuText, ScrollBar. Tom: I don't really see how the OS tab folder colours are exposed. Any idea how to obtain these values?
When doing colours in eclipse 3.x, I think a lot of variations were defined as SystemColor+10%, SystemColor+20% or something. Am I correct that CSS doesn't support a "relative to system font/color" syntax? PW
I was to suggest something like this. JavaFX CSS does this using 2 functions () See http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#typecolor: derive( <color> , <number>% ) ladder(<color> , <color-stop> [, <color-stop>]+) Their trick is quite nice because they define a base color and then allow you to reference this base-color from everywhere which means you to switch from a blue to green theme you only change 1 color and then all other colors are calculated from this base
Todo: Need to also re-apply CSS on SWT.Settings event (sent when system settings change).
See bug 402530 Does that mean this is fixed? PW
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the stalebug whiteboard tag.