Bug 570508 - [GTK3] Table header text drawn over column separators
Summary: [GTK3] Table header text drawn over column separators
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.19   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-20 06:56 EST by Thomas Singer CLA
Modified: 2021-02-04 07:30 EST (History)
4 users (show)

See Also:


Attachments
Snippet to reproduce (1.65 KB, text/plain)
2021-01-20 06:57 EST, Thomas Singer CLA
no flags Details
Screenshot from Manjaro (6.14 KB, image/png)
2021-01-20 06:57 EST, Thomas Singer CLA
no flags Details
Screenshot from Manjaro (6.51 KB, image/png)
2021-01-20 06:58 EST, Thomas Singer CLA
no flags Details
Zoomed in version of the previous image (19.49 KB, image/png)
2021-02-02 06:51 EST, Thomas Singer CLA
no flags Details
Snippet ran on Gnome Wayland (18.40 KB, image/png)
2021-02-02 10:27 EST, Soraphol (Paul) Damrongpiriyapong CLA
no flags Details
Screenshot with Matcha-light-sea theme (6.77 KB, image/png)
2021-02-04 07:21 EST, Thomas Singer CLA
no flags Details
Screenshot with Matcha-light-sea theme without setting colors (6.56 KB, image/png)
2021-02-04 07:23 EST, Thomas Singer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Singer CLA 2021-01-20 06:56:30 EST
Please launch attached snippet on Linux (tried Manjaro). The column separators should be one single line over the full height of the table header, but it is interrupted by the text background.
Comment 1 Thomas Singer CLA 2021-01-20 06:57:04 EST
Created attachment 285327 [details]
Snippet to reproduce
Comment 2 Thomas Singer CLA 2021-01-20 06:57:42 EST
Created attachment 285328 [details]
Screenshot from Manjaro
Comment 3 Thomas Singer CLA 2021-01-20 06:58:37 EST
Created attachment 285329 [details]
Screenshot from Manjaro
Comment 4 Thomas Singer CLA 2021-02-02 06:51:08 EST
Created attachment 285430 [details]
Zoomed in version of the previous image
Comment 5 Soraphol (Paul) Damrongpiriyapong CLA 2021-02-02 10:27:47 EST
Created attachment 285432 [details]
Snippet ran on Gnome Wayland

Unfortunately I am unable to reproduce this on Gnome. Looking at the code, I don't really see why the background color would be used for a portion of the separator, since the background css is applied only to the buttons.
Comment 6 Thomas Singer CLA 2021-02-02 15:15:53 EST
I'm using Gnome as well. Are there any information I can provide to make you understand what the problem might be?
Comment 7 Thomas Wolf CLA 2021-02-02 17:33:00 EST
Are you sure this is the text background, which you set to #414141? The black interruption is clearly looks blacker on my screen and seems to be #393939.
Comment 8 Thomas Wolf CLA 2021-02-03 02:13:54 EST
Two more observations just from looking at the code in Table.setHeaderBackground():

* Table.setHeaderBackground() only adds a new style provider. Shouldn't it also
  remove a previously set provider? Otherwise providers pile up when this is
  called several times?
* According to [1], user CSS can still override this. Could that explain why
  Paul cannot reproduce?

[1] https://developer.gnome.org/gtk3/stable/GtkStyleContext.html#id-1.5.4.10.8
Comment 9 Soraphol (Paul) Damrongpiriyapong CLA 2021-02-03 15:54:44 EST
1) Thank you for pointing this out. I have fixed the patch to include a change in which the Tree/Table Column have their own headerButtonCSSProvider which will be reused until the column is disposed. 

2) You are right that user CSS can override this. This could affect why I can't see it. If you don't mind testing setting the header background to red, so we can see if the separator is getting the color from the background we are setting or from some other source.
Comment 10 Thomas Wolf CLA 2021-02-03 17:10:25 EST
(In reply to Soraphol (Paul) Damrongpiriyapong from comment #9)
> 2) You are right that user CSS can override this. This could affect why I
> can't see it. If you don't mind testing setting the header background to
> red, so we can see if the separator is getting the color from the background
> we are setting or from some other source.

@Thomas Singer; could you try that? I can't check this; my observations were just from code inspection and inspection of the screenshots. I'm on OS X; have no Linux setup.
Comment 11 Thomas Singer CLA 2021-02-04 05:38:23 EST
(In reply to Soraphol (Paul) Damrongpiriyapong from comment #9)
> 1) Thank you for pointing this out. I have fixed the patch to include a
> change in which the Tree/Table Column have their own headerButtonCSSProvider
> which will be reused until the column is disposed. 

Where can I find it? It shouldn't be part of the master, yet, right?
Comment 12 Thomas Wolf CLA 2021-02-04 05:40:35 EST
(In reply to Thomas Singer from comment #11)
> Where can I find it? It shouldn't be part of the master, yet, right?

Paul means https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/175592 .
Comment 13 Thomas Singer CLA 2021-02-04 07:21:50 EST
Created attachment 285445 [details]
Screenshot with Matcha-light-sea theme
Comment 14 Thomas Singer CLA 2021-02-04 07:23:51 EST
Created attachment 285446 [details]
Screenshot with Matcha-light-sea theme without setting colors
Comment 15 Thomas Singer CLA 2021-02-04 07:25:00 EST
Setting env var GTK_THEME to Adwaita shows everything fine, so it looks like a problem with theming the Matcha-light-sea theme.
Comment 16 Thomas Singer CLA 2021-02-04 07:25:44 EST
Is Eclipse forceibly setting the GTK_THEME to Adwaita to avoid such problems?
Comment 17 Alexander Kurtakov CLA 2021-02-04 07:30:50 EST
(In reply to Thomas Singer from comment #16)
> Is Eclipse forceibly setting the GTK_THEME to Adwaita to avoid such problems?

No we don't but https://www.eclipse.org/eclipse/development/plans/eclipse_project_plan_4_19.xml#target_environments says:
""
With respect to GTK 3 themes: Adwaita theme is guaranteed to work. Eclipse SDK will run with other GTK 3 themes, however we cannot flag these as reference versions without significant community support for testing and/or development of fixes. Bugs that are reproducible only with themes other than Adwaita will be given a lower priority (or may not be fixed at all), compared to bugs which are reproducible on the target environments listed above. 
""

There are so many themes with a good part of them being half baked that providing support for random one is just unrealistic which led us to add this statement.