Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 417726

Summary: [Themes] GTK theme toolbar gradient looks bad
Product: [Eclipse Project] Platform Reporter: Robin Stocker <robin>
Component: UIAssignee: Paul Webster <pwebster>
Status: VERIFIED FIXED QA Contact: Daniel Rolka <daniel.rolka>
Severity: normal    
Priority: P3 CC: daniel_megert, gheorghe, Lars.Vogel
Version: 4.4   
Target Milestone: 4.4 M3   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Bug Depends on: 420035    
Bug Blocks:    
Attachments:
Description Flags
toolbar gradient (magnified 4 times)
none
before change
none
after change none

Description Robin Stocker CLA 2013-09-20 16:37:37 EDT
Created attachment 235675 [details]
toolbar gradient (magnified 4 times)

See attached picture (left side) for how the toolbar looks on Linux with Eclipse 4.4 M1. The problem is that the gradient does not fade smoothly into the other area at the bottom. On the right, I manually removed the bottom part of the gradient which makes it much better already.

The gradient of the Package Explorer tab on the other hand is so nice that I don't want to stop looking at it ;).

The problem may be caused by a technical limitation. If that's the case, it should be considered to remove the gradient until it can be fixed.

I am very willing to provide patches, but don't know where to look yet, so some hints would be appreciated.

There are other bugs about the theme but I didn't find one specifically for this.
Comment 1 Paul Webster CLA 2013-09-23 11:03:26 EDT
Bogdan, any hint on where we're generating that gradient?

PW
Comment 2 Robin Stocker CLA 2013-10-19 12:06:04 EDT
Ping? Is eclipse.platform.ui the right repository to find this? Any hints where to start looking or put a breakpoint?
Comment 3 Robin Stocker CLA 2013-10-19 12:38:41 EDT
I think I found it (with lots of googling). This looks good:

https://git.eclipse.org/c/platform/eclipse.platform.git/tree/platform/org.eclipse.platform/css

Now to figure out how to run with these definitions.
Comment 4 Paul Webster CLA 2013-10-21 10:56:39 EDT
https://git.eclipse.org/c/platform/eclipse.platform.git/tree/platform/org.eclipse.platform/plugin.xml#n128 is where those stylesheets are attached to themes on the Preferences>General>Appearance pref page.

PW
Comment 5 Robin Stocker CLA 2013-10-21 11:00:11 EDT
Thanks Paul, I have it working here. It depends on changes in the theme engine so that SWT color constants can be used as part of gradients. I'll push to Gerrit soon. By the way, do you know the answer to bug 402530 comment 4?
Comment 6 Paul Webster CLA 2013-10-21 11:17:39 EDT
(In reply to Robin Stocker from comment #5)
> Thanks Paul, I have it working here. It depends on changes in the theme
> engine so that SWT color constants can be used as part of gradients. I'll
> push to Gerrit soon. By the way, do you know the answer to bug 402530
> comment 4?

No, I don't know.  You should open a new bug and we'll put Bogdan and Daniel R on it to see if it should be made consistent.

AFAIK we're supposed to translate anything like org.eclipse.ui to org-eclipse-ui for CSS compatibility

PW
Comment 7 Robin Stocker CLA 2013-10-21 18:58:44 EDT
(In reply to Paul Webster from comment #6)
> No, I don't know.  You should open a new bug and we'll put Bogdan and Daniel
> R on it to see if it should be made consistent.
> 
> AFAIK we're supposed to translate anything like org.eclipse.ui to
> org-eclipse-ui for CSS compatibility

Done, see bug 420036.
Comment 8 Robin Stocker CLA 2013-10-21 19:00:40 EDT
For implementing a better gradient, it would help if the gradient could be defined using a system color. I openend bug 420035 with a patch for making this possible.
Comment 9 Robin Stocker CLA 2013-10-23 16:38:11 EDT
Created attachment 236820 [details]
before change
Comment 10 Robin Stocker CLA 2013-10-23 16:41:29 EDT
Created attachment 236821 [details]
after change

Proposed change:

https://git.eclipse.org/r/17703

The attachment "after change" shows how it looks with the above change. Compare it to "before change". IMO it is much more pleasant to look at.
Comment 12 Paul Webster CLA 2013-10-29 11:29:19 EDT
In 4.4.0.I20131028-2000
PW