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

Bug 433830

Summary: Part's background color is wrong
Product: [Eclipse Project] Platform Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: Daniel Rolka <daniel.rolka>
Status: VERIFIED FIXED QA Contact: Daniel Rolka <daniel.rolka>
Severity: major    
Priority: P1 CC: andrea.guarinoni, markus.kell.r, pwebster, sudol.wojciech
Version: 4.4   
Target Milestone: 4.4 M7   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 434134    
Attachments:
Description Flags
Screenshot of the "Source not found" editor.
none
The empty Console and Outline views in the Classic theme
none
dark before
none
dark after
none
Bad toolbar on package explorer
none
I20140501-0200_themes_screenshots none

Description Dani Megert CLA 2014-04-30 06:12:15 EDT
I20140429-2000.

With the fix for bug 430872 the background was correctly decoupled from the tab bg end color (good), however, it is now wrongly connected to the active, unselected part color. Instead, it should be white.
Comment 1 Dani Megert CLA 2014-04-30 06:13:29 EDT
Daniel, this must be fixed for M7.
Comment 2 Wojciech Sudol CLA 2014-04-30 06:16:02 EDT
Created attachment 242530 [details]
Screenshot of the "Source not found" editor.

The result of the bug is that some views and editors look really bad, e.g. the "Source not found" editor - see attached screenshot.
Comment 3 Daniel Rolka CLA 2014-04-30 08:36:15 EDT
Created attachment 242539 [details]
The empty Console and Outline views in the Classic theme

(In reply to Dani Megert from comment #0)
> I20140429-2000.
> 
> With the fix for bug 430872 the background was correctly decoupled from the
> tab bg end color (good), however, it is now wrongly connected to the active,
> unselected part color. Instead, it should be white.

Just to clarify - for the empty views it works in the same way as in the 'classic' theme, see attachment. Since the 'classic' theme has got mainly the gray colors so it is not so visible.

I agree that it should be white and I work on the fix for that

Daniel
Comment 4 Andrea Guarinoni CLA 2014-04-30 09:16:05 EDT
The change in I20140429-2000 brokes also the dark theme in the way reported by Dani.

I attach the screenshots.
Comment 5 Andrea Guarinoni CLA 2014-04-30 09:17:06 EDT
Created attachment 242543 [details]
dark before
Comment 6 Andrea Guarinoni CLA 2014-04-30 09:17:39 EDT
Created attachment 242544 [details]
dark after
Comment 7 Daniel Rolka CLA 2014-04-30 09:23:02 EDT
(In reply to Andrea Guarinoni from comment #6)
> Created attachment 242544 [details]
> dark after

See the bug 430872 for more details

Daniel
Comment 8 Daniel Rolka CLA 2014-04-30 09:31:07 EDT
(In reply to Daniel Rolka from comment #7)
> (In reply to Andrea Guarinoni from comment #6)
> > Created attachment 242544 [details]
> > dark after
> 
> See the bug 430872 for more details
> 
> Daniel

I think it is proper time for extracting the old version of the CTabRendering class to the 'org.eclipse.ui.themes' bundle and use it as the 'Dark' theme specific renderer for the CTabFolder items

Daniel
Comment 9 Paul Webster CLA 2014-04-30 09:35:44 EDT
Created attachment 242545 [details]
Bad toolbar on package explorer
Comment 10 Andrea Guarinoni CLA 2014-04-30 10:03:32 EDT
(In reply to Paul Webster from comment #9)
> Created attachment 242545 [details]
> Bad toolbar on package explorer

It affects the 'inner' menu of any Part, if you increase your package-explorer width then the menu will fit on the tab's space and only the line that should contain the empty 'menu' will be painted with gray. The opposite happens if you reduce the width of other Parts.  

The background color of the 'inner' menu of CTabFolder with CTabRendering now is painted with the same gradient of 'swt-unselected-tabs-color'. Instead, it should be controlled in a separated way. Eg. the 'background' and 'background-color' properties of CTabFolder with CTabRendering seem to be unused.
Comment 11 Dani Megert CLA 2014-04-30 10:11:12 EDT
(In reply to Daniel Rolka from comment #3)
> I agree that it should be white and I work on the fix for that
> 
> Daniel

Yes, initially white. The bonus question is, whether you can connect it to an existing preference. In 3.x / classic this was always the gray color coming from SWT.
Comment 12 Daniel Rolka CLA 2014-04-30 10:25:09 EDT
(In reply to Dani Megert from comment #11)
> (In reply to Daniel Rolka from comment #3)
> > I agree that it should be white and I work on the fix for that
> > 
> > Daniel
> 
> Yes, initially white. The bonus question is, whether you can connect it to
> an existing preference. In 3.x / classic this was always the gray color
> coming from SWT.

We support the ColorDefinitions and the SWT color constants for the color values in the CSS files so we should be able to do it. However for now I would like to commit the fixed version (last days of the M7)

Daniel
Comment 13 Dani Megert CLA 2014-04-30 10:27:43 EDT
(In reply to Daniel Rolka from comment #12)
> (In reply to Dani Megert from comment #11)
> > (In reply to Daniel Rolka from comment #3)
> > > I agree that it should be white and I work on the fix for that
> > > 
> > > Daniel
> > 
> > Yes, initially white. The bonus question is, whether you can connect it to
> > an existing preference. In 3.x / classic this was always the gray color
> > coming from SWT.
> 
> We support the ColorDefinitions and the SWT color constants for the color
> values in the CSS files so we should be able to do it. However for now I
> would like to commit the fixed version (last days of the M7)

Right. Using the SWT color wouldn't work since the default is white and not the SWT color we used in 3.x / classic.
Comment 14 Daniel Rolka CLA 2014-04-30 13:02:01 EDT
Released as: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=bd6eb85ddf810df4e8491e0bd38dfa1ec29ea1d2

Probably the 'Dark' theme needs to be better adjusted, but for now it works fine for me

Daniel
Comment 15 Eric Moffatt CLA 2014-05-01 10:20:47 EDT
In 4.4.0.I20140501-0200 I'm still seeing the 'active' color bleed into the Outline view's area if you activate it with no editors open...
Comment 16 Andrea Guarinoni CLA 2014-05-01 10:48:00 EDT
Daniel I tried the latest I20140501-0200 that contains the fix, I attach the screenshots of it under Windows 7. 

Is it how is intended to be? Unfortunately, if the background-color of the inner-menu of CTabFolder remains linked to the value of 'swt-unselected-tabs-color', there is no CSS hacks/fixes to restore the look of the 'Dark' theme. In my opinion, it's also better to leave the ToolBars unstyled in CSS because they automatically inherit the values from the parent widget and can be positioned into different kinds of Composites that can have different colors so forcing them to a fixed color can generate artifacts.

(anyhow, for the other themes, except for the borders, a look similar to the current one can be obtained also with the previous version of the renderer by tweaking the gradients)
Comment 17 Andrea Guarinoni CLA 2014-05-01 10:48:55 EDT
Created attachment 242609 [details]
I20140501-0200_themes_screenshots
Comment 18 Markus Keller CLA 2014-05-05 12:57:16 EDT
Filed bug 434134 to fix the problems from comment 15 to comment 17.
Comment 19 Daniel Rolka CLA 2014-06-04 05:17:00 EDT
Verified in the build: 4.4RC3

Daniel