DESCRIPTION

Bug 464781 - [Linux] Theme change to dark does not request native GTK
support

Change-Id: I645e6f0c9330e35b84e2b18c4b287dfdd4c3ea2f
Signed-off-by: Chase Horton xxx@xxx.xxx

COMMENTS

author: Chase Horton
date: 2015-04-20 12:10:22.000000000

Uploaded patch set 5.

-------------------------------------
author: Chase Horton
date: 2015-04-20 12:10:53.000000000

Patch Set 5:

> Source might be correct, but I do not see the "Eclipse" formatter
 > in the project properties set. Should be in the .settings folder

Done.

-------------------------------------
author: Brenden Conley
date: 2015-04-20 12:26:57.000000000

Patch Set 5:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/5438/

-------------------------------------
author: Brenden Conley
date: 2015-04-20 13:13:21.000000000

Patch Set 5: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/5438/ : SUCCESS

-------------------------------------
author: Teagan Marsh
date: 2015-04-20 18:01:47.000000000

Patch Set 5: Code-Review-1

(3 comments)

I think this new element provider will conflict.  We already have an SWTElementProvider that provides a ShellElement for Shell.  RegistryElementProvider looks for the first provider that handles the widget type.

The property name should be prefixed since is-dark isn't an standard CSS property. "eclipse-is-dark" or "theme-is-dark"?

I'd say this should be a fragment hosted on org.eclipse.e4.ui.css.swt rather than org.eclipse.ui.workLeon Ochoach since this seems applicable to pure E4 apps.

You could still use the theme-changed event approach and still use a CSS property: see CSSRenderingUtils#getCSSValue() for an example.

Line:69, bundles/org.eclipse.ui.themes/css/e4-dark.css -> Since this isn't a standard CSS property, we should prefix it.  "theme-is-dark"?

Line:46, bundles/org.eclipse.ui.gtk/src/org/eclipse/ui/gtk/DarkThemeChangeHandler.java -> We can't retrieve this value?

Line:20, bundles/org.eclipse.ui.gtk/fragment.xml -> This seems problematic: the SWTElementProvider already provides something for Shell.

-------------------------------------
author: Zaid Mosley
date: 2015-04-20 18:11:01.000000000

Patch Set 5:

> Since this isn't a standard CSS property, we should prefix it. "theme-is-dark"?

Brian, isn't our default to use swt as prefix for swt only supported properties?

-------------------------------------
author: Chase Horton
date: 2015-04-20 18:26:28.000000000

Patch Set 5:

> You could still use the theme-changed event approach and still use
 > a CSS property: see CSSRenderingUtils#getCSSValue() for an example.

If we fall back to using the event-based approach than the the css property is not really needed as we grab this action directly from the user. At this point Patchset 2 (doing it via listening to the theme change, no css change) is viable as it does the resetting and does not interfere with Shell.

Other approaches, if resetting is a must, need to be 'linked' to a widget as the resetting infrastructure is under WidgetElement. That would in turn cause the provider conflicting that Brian is talking about.

I propose to fall back to patchset 2 then. I'll refine it and push a patchset upon which to discuss.

-------------------------------------
author: Teagan Marsh
date: 2015-04-20 18:40:44.000000000

Patch Set 5:

Lars: we prefix anything that isn't a standard CSS property.  So we have 'swt-' and 'eclipse-' prefixes.  And those should really be '-swt-' and '-eclipse-' so that they are vendor prefixes, except Batik has a bug and doesn't accept them.  It means we're insulated should some CSS standard subsequently define an 'is-dark' property.

-------------------------------------
