Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354783 - [CSS] Refactor custom properties
Summary: [CSS] Refactor custom properties
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.2 M7   Edit
Assignee: Brian de Alwis CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 325580 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-15 21:05 EDT by Bogdan Gheorghe CLA
Modified: 2012-05-07 11:45 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bogdan Gheorghe CLA 2011-08-15 21:05:20 EDT
Currently there are a number of custom properties that are contributed to help style the CTabFolder. These property names should be refactored to reflect that they are contributed and not part of the standard CSS2 selector list.

The initial proposed format is:

tab-renderer          => -swt-tabrender
unselected-tabs-color => -swt-unselected-tabs-color
Comment 1 Thomas Schindl CLA 2011-10-06 11:08:52 EDT
I would go even further and prefix all and everything we support with -swt because we e.g. don't respect all the different length values (pt,em,...)
Comment 2 Paul Webster CLA 2012-02-15 08:09:12 EST
Bogdan, is this something we need to address before we send everybody running for the style sheets?

We also have properties like single and simple that probably aren't part of CSS.

PW
Comment 3 Thomas Schindl CLA 2012-02-23 10:11:33 EST
*** Bug 325580 has been marked as a duplicate of this bug. ***
Comment 4 Thomas Schindl CLA 2012-02-23 10:46:51 EST
We should definately fix all of our properties none of them is compatible with the Web-CSS e.g. we can't support px, em on font-size, our background-color definition (with gradients) is totally different to the Web one, ...
Comment 5 Brian de Alwis CLA 2012-03-11 18:22:00 EDT
Pushed as commit aeacb33f1e345f110ade10a788da98d0569d8dbb.

Added deprecated tag to <property-name> element.

Deprecated existing custom properties and re-added with prefix '-swt-' or '-e4-' (org.eclipse.ui.workbench's "perspective-keyline-color").

Add some more detail to property.handler extension point.

Use of deprecated properties logs a message using org.eclipse.core.runtime's log using the internal RuntimeLog class.  This isn't ideal, I know, but from other bugs, it seemed somewhat desirable that the CSS support non-OSGi situations.
Comment 6 Kai Toedter CLA 2012-03-12 08:24:14 EDT
After the CSS refactoring, the whole CSS (dynamic) theme switching of the e4
contacts demo (in platform.ui, project org.eclipse.e4.demo.contacts) does not
work anymore.

Invoking engine.setTheme(themeId, true) in class SwitchThemeHandler with correct css theme ids has no effect anymore (it was working perfectly in 4.2 M5)

Please tell me either what to do with the contacts demo or make the theming
backwards compatible (in terms of workflow) with 4.2 M5
Comment 7 Brian de Alwis CLA 2012-03-12 08:27:29 EDT
Re: bug 373939 comment 5

Kai: I've just tested the contacts demo and theme switching works with no issue.

These changes did not touch the theme engine or theme manager.

Do you have anything coming up in your logs?
Comment 8 Kai Toedter CLA 2012-03-12 08:58:40 EDT
@Brian, after another pull of platform.ui and platform.runtime, the theme switching is working again! I have no idea why it was not working 30 minutes ago since I deleted everything completely (physically) and got a freah clean master from both repos. But anyway, everything is fine now, thanks again.
Comment 9 Brian de Alwis CLA 2012-03-12 21:44:09 EDT
Marking as resolved.
Comment 10 Brian de Alwis CLA 2012-05-07 11:45:06 EDT
Verified in I20120503-1800
Comment 11 Brian de Alwis CLA 2012-05-07 11:45:17 EDT
Verified in I20120503-1800