Bug 483493 - Tab separator has white background
Summary: Tab separator has white background
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.17 M1   Edit
Assignee: Amit Mendapara CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 497829 520099 (view as bug list)
Depends on:
Blocks: 563540
  Show dependency tree
 
Reported: 2015-12-02 11:15 EST by Eric Williams CLA
Modified: 2020-06-11 03:09 EDT (History)
11 users (show)

See Also:


Attachments
White tab separator sized area/sliver (20.06 KB, image/png)
2015-12-02 11:15 EST, Eric Williams CLA
no flags Details
Screenshot (6.44 KB, image/png)
2019-10-21 09:52 EDT, Lars Vogel CLA
no flags Details
Screenshot (335.55 KB, image/png)
2019-11-06 05:09 EST, Lars Vogel CLA
no flags Details
Layout spy (289.14 KB, image/png)
2019-11-06 10:23 EST, Lars Vogel CLA
no flags Details
remove-spacing.patch (891 bytes, patch)
2020-05-28 10:45 EDT, Amit Mendapara CLA
no flags Details | Diff
Linux Dark Toolbars - 163797 (8.13 KB, image/png)
2020-06-08 10:33 EDT, Mike Marchand CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Williams CLA 2015-12-02 11:15:29 EST
Created attachment 258421 [details]
White tab separator sized area/sliver

In tab areas (like the one near Package Explorer, Outline, etc.), there is an area the size of a separator which is white/has a white background. This stands out since the background is light gray. You can see it both when the tab is focused and not.

I can confirm that it's a Platform UI issue since running a child Eclipse with only the latest SWT (and not the latest Platform UI) doesn't reproduce the issue. As soon as I run a child Eclipse with the latest Platform UI from master, the issue appears.

It's possible it's related to this commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=88c5aba15dc5a16b66b331b2d072499da9065d37

I've attached a screenshot showing the issue.
Comment 1 Eric Williams CLA 2016-07-13 09:47:15 EDT
*** Bug 497829 has been marked as a duplicate of this bug. ***
Comment 2 Alexander Kurtakov CLA 2016-07-13 10:10:19 EDT
Eric, is it possible that setBackground is not working for ToolItem(style=SWT.SEPARATOR) as it uses different css node separator?
Comment 3 Eric Williams CLA 2016-07-13 10:12:44 EDT
(In reply to Alexander Kurtakov from comment #2)
> Eric, is it possible that setBackground is not working for
> ToolItem(style=SWT.SEPARATOR) as it uses different css node separator?

Will investigate.
Comment 4 Eric Williams CLA 2017-07-24 10:55:22 EDT
*** Bug 520099 has been marked as a duplicate of this bug. ***
Comment 5 Eric Williams CLA 2017-07-24 17:12:12 EDT
(In reply to Eric Williams from comment #3)
> (In reply to Alexander Kurtakov from comment #2)
> > Eric, is it possible that setBackground is not working for
> > ToolItem(style=SWT.SEPARATOR) as it uses different css node separator?
> 
> Will investigate.

Follow up: it's not related AFAICT.
Comment 6 Lars Vogel CLA 2019-10-21 09:52:30 EDT
Created attachment 280362 [details]
Screenshot

4 years later, and we still have a while strip. See screenshot.
Comment 7 Matthias Becker CLA 2019-10-21 09:56:06 EDT
(In reply to Lars Vogel from comment #6)
> Created attachment 280362 [details]
> Screenshot
> 
> 4 years later, and we still have a while strip. See screenshot.

seems to be a Linux issue. On macOS I don't see this.
Comment 8 Lars Vogel CLA 2019-11-04 09:10:42 EST
Looks like we seen the underlying Composite.

For testing, add the following to e4-dark_globalstyle.css in org.eclipse.ui.themes

CTabFolder > Composite {
	background-color:red;
}
Comment 9 Lars Vogel CLA 2019-11-06 05:09:33 EST
Created attachment 280523 [details]
Screenshot

Eric, looks to me that we have a additional Composite in the view toolbar (the red bar). Is this necessary or could this be removed on the SWT side?
Comment 10 Eric Williams CLA 2019-11-06 08:55:19 EST
(In reply to Lars Vogel from comment #9)
> Created attachment 280523 [details]
> Screenshot
> 
> Eric, looks to me that we have a additional Composite in the view toolbar
> (the red bar). Is this necessary or could this be removed on the SWT side?

It is necessary on GTK, all Composite widgets have this. However this doesn't mean we need to live with the ugliness. :) 

I am thinking of a few solutions:

1) I can try setting the background color of it in SWT to match the ToolBar's background color.

2) Can we theme it in Platform UI to make it transparent, so it inherits the parent's background color?


What do you think?
Comment 11 Eric Williams CLA 2019-11-06 09:13:57 EST
(In reply to Eric Williams from comment #10)
> (In reply to Lars Vogel from comment #9)
> > Created attachment 280523 [details]
> > Screenshot
> > 
> > Eric, looks to me that we have a additional Composite in the view toolbar
> > (the red bar). Is this necessary or could this be removed on the SWT side?
> 
> It is necessary on GTK, all Composite widgets have this. However this
> doesn't mean we need to live with the ugliness. :) 
> 
> I am thinking of a few solutions:
> 
> 1) I can try setting the background color of it in SWT to match the
> ToolBar's background color.
> 
> 2) Can we theme it in Platform UI to make it transparent, so it inherits the
> parent's background color?
> 
> 
> What do you think?

I looked into the IDE a bit closer using GtkInspector and the Composite you are interested in is not related to the ToolBar, it's the parent for all the ToolBars in that area.

My thought is that this Composite is missing some styling in the theme engine. It's possible other platforms don't need it to be themed because the Composite has the right background color implicitly, but it seems on GTK the background color is coming from somewhere else, or isn't being set at all. Alternatively there could be a bug in SWT Composite's color inheritance (like bug 519416) but I don't know enough about how the parent Composite is constructed.

Lars, could you point me to the class in Platform UI that constructs this Composite?
Comment 12 Lars Vogel CLA 2019-11-06 10:22:17 EST
(In reply to Eric Williams from comment #11)

> Lars, could you point me to the class in Platform UI that constructs this
> Composite?

I think this is CTabFolder. See screenshot from the Layout Spy (Ctrl+Shift+Alt+F9).
Comment 13 Lars Vogel CLA 2019-11-06 10:23:10 EST
Created attachment 280528 [details]
Layout spy
Comment 14 Lars Vogel CLA 2019-11-06 10:53:51 EST
(In reply to Lars Vogel from comment #12)
> (In reply to Eric Williams from comment #11)
> 
> > Lars, could you point me to the class in Platform UI that constructs this
> > Composite?
> 
> I think this is CTabFolder. See screenshot from the Layout Spy
> (Ctrl+Shift+Alt+F9).

Ah, looks like this is handled / caused by org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.
Comment 15 Eric Williams CLA 2019-11-06 11:00:27 EST
Perfect, thanks for the info. I'll take a look next week.
Comment 16 Dani Megert CLA 2019-11-26 05:45:12 EST
Please retarget if you still plan to fix this for 4.14.
Comment 17 Matthias Becker CLA 2020-03-12 02:58:14 EDT
(In reply to Eric Williams from comment #15)
> Perfect, thanks for the info. I'll take a look next week.

Eric. Do you have plans to continue work on this?
Comment 18 Alexander Kurtakov CLA 2020-03-12 05:00:15 EDT
(In reply to Matthias Becker from comment #17)
> (In reply to Eric Williams from comment #15)
> > Perfect, thanks for the info. I'll take a look next week.
> 
> Eric. Do you have plans to continue work on this?

Eric no longer works on SWT so I doubt he has such plans.
Comment 19 Lars Vogel CLA 2020-05-08 02:01:56 EDT
Mike, can you have a look?
Comment 20 Mike Marchand CLA 2020-05-08 08:54:52 EDT
Sometime over the next couple days I can try to take a look in my Linux VM to see what I can ascertain.
Comment 21 Alexander Kurtakov CLA 2020-05-08 09:02:14 EDT
So if I disable theming the issue is not visible so I'm quite sure that it comes from code in platform.ui CTabRenderer.
Comment 22 Lars Vogel CLA 2020-05-11 06:41:29 EDT
(In reply to Mike Marchand from comment #20)
> Sometime over the next couple days I can try to take a look in my Linux VM
> to see what I can ascertain.

Thanks!
Comment 23 Lars Vogel CLA 2020-05-25 09:05:43 EDT
Some issue can be seen in the dark theme.
Comment 24 Mike Marchand CLA 2020-05-27 11:27:24 EDT
I spent a significant amount of time investigating this issue on my Linux VM yesterday.  I can see the problem, but I wasn't able to trace the difference between the Win32 and GTK behavior.  I'm going to have to revisit this some time again in the future.
Comment 25 Lars Vogel CLA 2020-05-28 02:00:57 EDT
(In reply to Mike Marchand from comment #24)
> I spent a significant amount of time investigating this issue on my Linux VM
> yesterday.  I can see the problem, but I wasn't able to trace the difference
> between the Win32 and GTK behavior.  I'm going to have to revisit this some
> time again in the future.

Maybe the same issue as in Bug 539661?
Comment 26 Amit Mendapara CLA 2020-05-28 04:02:48 EDT
(In reply to Lars Vogel from comment #25)
> (In reply to Mike Marchand from comment #24)
> > I spent a significant amount of time investigating this issue on my Linux VM
> > yesterday.  I can see the problem, but I wasn't able to trace the difference
> > between the Win32 and GTK behavior.  I'm going to have to revisit this some
> > time again in the future.
> 
> Maybe the same issue as in Bug 539661?

Yes it's. I just tested latest gerrit patches for but 539661 and it fixed the issue.
Comment 27 Amit Mendapara CLA 2020-05-28 04:10:55 EDT
(In reply to Amit Mendapara from comment #26)
> (In reply to Lars Vogel from comment #25)
> > (In reply to Mike Marchand from comment #24)
> > > I spent a significant amount of time investigating this issue on my Linux VM
> > > yesterday.  I can see the problem, but I wasn't able to trace the difference
> > > between the Win32 and GTK behavior.  I'm going to have to revisit this some
> > > time again in the future.
> > 
> > Maybe the same issue as in Bug 539661?
> 
> Yes it's. I just tested latest gerrit patches for but 539661 and it fixed
> the issue.

Ignore my last comment.
Comment 28 Mike Marchand CLA 2020-05-28 10:12:26 EDT
Right, unfortunately those two bugs are not related.  

This particular bug has to do with the way colors are being resolved differently when calculated by CSS vs setBackground(color) vs setBackground(null)... for some reason, on Windows and Mac, the colors are coming out correctly for the #ToolbarComposite in just about all cases but on Linux they are not.
Comment 29 Amit Mendapara CLA 2020-05-28 10:45:12 EDT
Created attachment 283057 [details]
remove-spacing.patch

I have tried removing the layout spacing. But I am not sure if it can affect other components.
Comment 30 Lars Vogel CLA 2020-05-28 10:46:12 EDT
Amit, please provide Gerrit. You know how :-)
Comment 31 Eclipse Genie CLA 2020-05-28 14:04:43 EDT
New Gerrit change created: https://git.eclipse.org/r/163797
Comment 32 Mike Marchand CLA 2020-06-08 10:33:46 EDT
Created attachment 283196 [details]
Linux Dark Toolbars - 163797

I'm still seeing a problem with https://git.eclipse.org/r/163797 applied
Comment 33 Amit Mendapara CLA 2020-06-08 10:46:56 EDT
(In reply to Mike Marchand from comment #32)
> Created attachment 283196 [details]
> Linux Dark Toolbars - 163797
> 
> I'm still seeing a problem with https://git.eclipse.org/r/163797 applied

The horizontal line? I think with my other patches for bug 563684 may fix that.
Comment 35 Lars Vogel CLA 2020-06-10 09:51:46 EDT
Thanks, Amit.

(In reply to Amit Mendapara from comment #33)
> (In reply to Mike Marchand from comment #32)
> > Created attachment 283196 [details]
> > Linux Dark Toolbars - 163797
> > 
> > I'm still seeing a problem with https://git.eclipse.org/r/163797 applied
> 
> The horizontal line? I think with my other patches for bug 563684 may fix
> that.

I also think that is another bug and should be handled somewhere else.
Comment 36 Amit Mendapara CLA 2020-06-11 03:09:09 EDT
(In reply to Lars Vogel from comment #35)
> Thanks, Amit.

Thanks, Lars. Feeling happy it was merged, my first contribution :)