Bug 539661 - inconsistent background color for view toolbars in dark theme
Summary: inconsistent background color for view toolbars in dark theme
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.9   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 4.16 RC2   Edit
Assignee: Mike Marchand CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks: 560385 563667
  Show dependency tree
 
Reported: 2018-09-30 12:14 EDT by Gayan Perera CLA
Modified: 2020-06-01 03:16 EDT (History)
9 users (show)

See Also:


Attachments
background 1 (3.71 KB, image/jpeg)
2018-09-30 12:14 EDT, Gayan Perera CLA
no flags Details
background 2 (4.45 KB, image/jpeg)
2018-09-30 12:14 EDT, Gayan Perera CLA
no flags Details
Left with inherit - right with the old hard coded colors (482.71 KB, image/png)
2019-03-26 07:50 EDT, Lars Vogel CLA
no flags Details
Before on macOS (64.91 KB, image/png)
2019-03-26 09:52 EDT, Matthias Becker CLA
no flags Details
Screenshot after on macOS (47.01 KB, image/png)
2019-03-26 09:53 EDT, Matthias Becker CLA
no flags Details
screenshot of search dialog (165.26 KB, image/png)
2019-03-27 11:59 EDT, Till Brychcy CLA
no flags Details
Screenshot for https://git.eclipse.org/r/#/c/139926/ (160.25 KB, image/png)
2019-04-02 16:18 EDT, Lars Vogel CLA
no flags Details
screenshots for https://git.eclipse.org/r/#/c/139926/ on macOS (41.80 KB, image/png)
2019-04-03 03:44 EDT, Matthias Becker CLA
no flags Details
Dark toolbar color inconsistency (116.86 KB, image/png)
2020-05-27 11:17 EDT, Mike Marchand CLA
no flags Details
Toolbar issue in search view screencast (519.64 KB, image/gif)
2020-05-28 07:08 EDT, Lars Vogel CLA
no flags Details
Screencast with fix in the search view (514.69 KB, image/gif)
2020-05-28 07:20 EDT, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gayan Perera CLA 2018-09-30 12:14:00 EDT
Created attachment 276072 [details]
background 1

The background color of toolbars in views (eg: Project Explorer, Package Explorer etc) has a different background in the dark theme. The toolbar background doesn't follows the background of its parent.
Comment 1 Gayan Perera CLA 2018-09-30 12:14:26 EDT
Created attachment 276073 [details]
background 2
Comment 2 Gayan Perera CLA 2018-10-01 11:36:52 EDT
If someone can point me out how i should approach this i can find my way and provide a gerrit patch. I tried altering the css but seems like the toolbars are not blending-in with the original gradient of the CTabFolder header. May be because that gradient is some what painted by the CTabFolder Renderer ?
Comment 3 Lars Vogel CLA 2018-10-07 07:15:51 EDT
(In reply to Gayan Perera from comment #2)
> If someone can point me out how i should approach this i can find my way and
> provide a gerrit patch. I tried altering the css but seems like the toolbars
> are not blending-in with the original gradient of the CTabFolder header. May
> be because that gradient is some what painted by the CTabFolder Renderer ?

Maybe the layout spy or the CSS spy helps? See http://www.vogella.com/tutorials/EclipsePlatformDevelopment/article.html#layout-spy-for-layout-information http://www.vogella.com/tutorials/Eclipse4CSS/article.html#css-spy
Comment 4 Lars Vogel CLA 2019-02-19 03:32:00 EST
Mass change, please reset target if you still planning to fix this for 4.11.
Comment 5 Lars Vogel CLA 2019-03-26 07:48:22 EDT
Best approach seems to be to inherit the colors from the parent for toolbar entries instead of setting a color. Gerrit upcoming.
Comment 6 Lars Vogel CLA 2019-03-26 07:50:25 EDT
Created attachment 278008 [details]
Left with inherit - right with the old hard coded colors
Comment 7 Eclipse Genie CLA 2019-03-26 07:53:06 EDT
New Gerrit change created: https://git.eclipse.org/r/139479
Comment 8 Matthias Becker CLA 2019-03-26 09:52:38 EDT
Created attachment 278010 [details]
Before on macOS
Comment 9 Matthias Becker CLA 2019-03-26 09:53:00 EDT
Created attachment 278011 [details]
Screenshot after on macOS
Comment 10 Matthias Becker CLA 2019-03-26 09:53:46 EDT
I tested on macOS. Is looks so much better with this patch.
@Gayan: Thank you for reporting.
@Lars: Thank you for fixing.
Comment 11 Gayan Perera CLA 2019-03-26 11:08:24 EDT
Its working on windows and linux as expected, Thanks @Lars :)
Comment 12 Lars Vogel CLA 2019-03-26 12:10:15 EDT
Thanks to Matthias and Gayan for the fast feedback and the test of the patch
Comment 14 Eclipse Genie CLA 2019-03-26 12:19:09 EDT
New Gerrit change created: https://git.eclipse.org/r/139520
Comment 16 Till Brychcy CLA 2019-03-27 11:57:46 EDT
(In reply to Eclipse Genie from comment #13)
> Gerrit change https://git.eclipse.org/r/139479 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/
> ?id=25715a37d79ac0b1a79852355f72a31e4095fda9

After this change, the background in the "Search" Dialog is white in many places in the dark design (on macOS 10.14.3). If I switch tabs and back, it gets corrected.
Comment 17 Till Brychcy CLA 2019-03-27 11:59:13 EDT
Created attachment 278039 [details]
screenshot of search dialog
Comment 18 Gayan Perera CLA 2019-03-28 00:04:38 EDT
Its same on windows as well :(.
Comment 19 Lars Vogel CLA 2019-03-28 06:19:56 EDT
Currently fighting an infection, not sure when I will be able to look it this. Feel free to revert if necessary.
Comment 20 Lars Vogel CLA 2019-04-02 05:30:18 EDT
Also reproducible on Linux, investigating this now.
Comment 21 Eclipse Genie CLA 2019-04-02 06:32:22 EDT
New Gerrit change created: https://git.eclipse.org/r/139886
Comment 22 Lars Vogel CLA 2019-04-02 06:37:47 EDT
(In reply to Eclipse Genie from comment #21)
> New Gerrit change created: https://git.eclipse.org/r/139886

This should fix the Search Dialog (and break again the toolbar colors). Till, can you please test? 

For the toolbar Composite color I most likely need to set an CSS class to target it.
Comment 23 Gayan Perera CLA 2019-04-02 08:45:14 EDT
Its strange how toolbar selector effects the composites in the search dialog :(
Comment 24 Eclipse Genie CLA 2019-04-02 10:07:51 EDT
New Gerrit change created: https://git.eclipse.org/r/139904
Comment 26 Lars Vogel CLA 2019-04-02 11:13:11 EDT
(In reply to Gayan Perera from comment #23)
> Its strange how toolbar selector effects the composites in the search dialog
> :(
CTabFolder > Composite > * is unfortunately not limited to the toolbar.
Comment 27 Eclipse Genie CLA 2019-04-02 11:15:05 EDT
New Gerrit change created: https://git.eclipse.org/r/139907
Comment 28 Lars Vogel CLA 2019-04-02 15:58:42 EDT
Note for myself, the view toolbar color comes from @import url("platform:/plugin/org.eclipse.ui.themes/css/dark/e4-dark_partstyle.css"); If I remove that import the view toolbar item looks good.
Comment 29 Eclipse Genie CLA 2019-04-02 16:04:52 EDT
New Gerrit change created: https://git.eclipse.org/r/139926
Comment 30 Lars Vogel CLA 2019-04-02 16:18:48 EDT
Created attachment 278124 [details]
Screenshot for https://git.eclipse.org/r/#/c/139926/

With https://git.eclipse.org/r/#/c/139926/ I think the toolbar styling looks really good. Tested on Linux.
Comment 31 Matthias Becker CLA 2019-04-03 03:44:21 EDT
Created attachment 278127 [details]
screenshots for https://git.eclipse.org/r/#/c/139926/ on macOS
Comment 32 Matthias Becker CLA 2019-04-03 03:46:01 EDT
(In reply to Matthias Becker from comment #31)
> Created attachment 278127 [details]
> screenshots for https://git.eclipse.org/r/#/c/139926/ on macOS

Tested https://git.eclipse.org/r/#/c/139926/ on macOS. It looks like this on macOS.
I like it.
Comment 35 Lars Vogel CLA 2019-04-03 04:10:51 EDT
Thanks, Matthias for verification. Also thanks to Till for reporting the issue with the search dialog.
Comment 36 Till Brychcy CLA 2019-04-03 09:43:10 EDT
Sorry for reopening again, but at least on the mac, if the window is not wide enough  and the toolbar moves to its own row below the view tabs, it is now impossible to see if a toggle is selected ( e.g. the "Link with editor and selection" and "Compare mode" buttons in the "Git Staging View" )
Comment 37 Eclipse Genie CLA 2019-04-04 04:38:06 EDT
New Gerrit change created: https://git.eclipse.org/r/140009
Comment 38 Lars Vogel CLA 2019-04-04 04:40:10 EDT
(In reply to Eclipse Genie from comment #37)
> New Gerrit change created: https://git.eclipse.org/r/140009

Till this should restore the background color (this again creates an inconsistent coloring in the toolbar) but should make the selection status visible again. So it is basically a revert for the css for the toolbar composite. 

This fixes the reported issue on Linux, please check on Mac and let me know if you also can see the selected item again.
Comment 39 Matthias Becker CLA 2019-04-04 06:54:01 EDT
(In reply to Lars Vogel from comment #38)
> (In reply to Eclipse Genie from comment #37)
> > New Gerrit change created: https://git.eclipse.org/r/140009
> 
> Till this should restore the background color (this again creates an
> inconsistent coloring in the toolbar) but should make the selection status
> visible again. So it is basically a revert for the css for the toolbar
> composite. 
> 
> This fixes the reported issue on Linux, please check on Mac and let me know
> if you also can see the selected item again.

selection status is visible on macOS again with that change.
Comment 40 Till Brychcy CLA 2019-04-04 16:00:04 EDT
I agree, the selection status is visible again.

But I noted something (probably for another bug):

I noted that the whole scheme regarding which view is selected and which tab is selected within it doesn't really make sense:

The selected view's tab group or selected tab within it is darker than the other ones. This doesn't make sense. Even in the dark design, the selected entry should be a bit brighter so it appears to be in the foreground.

Compare this to the macOS dark designs or the dark designs of firefox and chrome..

If that is changed, the background for the selected view's tab group would be brighter not totally dark, and the selection status visible even with inherited background...
Comment 41 Lars Vogel CLA 2019-04-05 03:59:38 EDT
(In reply to Till Brychcy from comment #40)
> I agree, the selection status is visible again.

Thanks for confirmation.

> But I noted something (probably for another bug):
> 
> I noted that the whole scheme regarding which view is selected and which tab
> is selected within it doesn't really make sense:

I agree.

> The selected view's tab group or selected tab within it is darker than the
> other ones. This doesn't make sense. Even in the dark design, the selected
> entry should be a bit brighter so it appears to be in the foreground.
> 
> Compare this to the macOS dark designs or the dark designs of firefox and
> chrome..
> 
> If that is changed, the background for the selected view's tab group would
> be brighter not totally dark, and the selection status visible even with
> inherited background...

I actually searching the setting for this since yesterday in the CSS :-) https://git.eclipse.org/r/#/c/140010/ is one approach to make it easier to find this setting. Once I find it (or someone else), I plan to change it, which should allow to revert https://git.eclipse.org/r/#/c/140009/ again and finally make the toolbar not ugly in the dark theme.
Comment 43 Eclipse Genie CLA 2019-04-08 23:45:51 EDT
New Gerrit change created: https://git.eclipse.org/r/140266
Comment 46 Gayan Perera CLA 2019-04-17 23:40:19 EDT
I tested the lastest I-Build and still the inconsistency is there it seems.
Comment 47 Lars Vogel CLA 2019-11-06 05:06:56 EST
Nice snippet to put into e4-dark_globalstyle.css for testing.



Shell,
Composite, ScrolledComposite, ExpandableComposite, Canvas, TabFolder, CLabel, Label,
CoolBar, Sash, Group, RefactoringLocationControl, ChangeParametersControl, Link, FilteredTree,
ProxyEntriesComposite, NonProxyHostsComposite, DelayedFilterCheckboxTree,
Splitter, ScrolledPageContent, ViewForm, LaunchConfigurationFilteredTree,
ContainerSelectionGroup, BrowseCatalogItem, EncodingSettings,
ProgressMonitorPart, DocCommentOwnerComposite, NewServerComposite,
NewManualServerComposite, ServerTypeComposite, FigureCanvas,
DependenciesComposite, ListEditorComposite, WrappedPageBook,
CompareStructureViewerSwitchingPane, CompareContentViewerSwitchingPane,
QualifiedNameComponent, RefactoringStatusViewer,
MessageLine,
Button /* SWT-BUG: checkbox inner label font color is not accessible */,
Composite > *, 
Group > StyledText {
    background-color:red;
    color:#eeeeee;
}

/* ############################## Toolbar ############################## */
/* Toolbar should inherit the colors of its container to avoid drawing artifacts*/
ToolBar > Composite,
ToolBar > Composite > *,
ToolBar {
	background-color:blue;
}
Comment 48 Mike Marchand CLA 2020-05-07 14:56:14 EDT
I think I have a couple CSS changes that will address this.
Comment 49 Lars Vogel CLA 2020-05-07 14:59:23 EDT
(In reply to Mike Marchand from comment #48)
> I think I have a couple CSS changes that will address this.

Cool
Comment 50 Eclipse Genie CLA 2020-05-07 15:04:58 EDT
New Gerrit change created: https://git.eclipse.org/r/162665
Comment 51 Mike Marchand CLA 2020-05-07 15:05:44 EDT
With the way things are currently, there are a couple states that are incorrect.

When the toolbar is on the second line:
-When first switching to a tab, the toolbar is the wrong color
-Selecting off the tab changes the color to another wrong color
-Selecting the view again will result in a correct color for the toolbar on the second row.

-Top row toolbars always look good.

All these scenarios have been tested in my patch, now the top row and second row toolbars always look correct.
Comment 53 Lars Vogel CLA 2020-05-08 01:58:56 EDT
Awesome Mike. Thanks!
Comment 54 Eclipse Genie CLA 2020-05-08 04:04:52 EDT
New Gerrit change created: https://git.eclipse.org/r/162682
Comment 56 Mike Marchand CLA 2020-05-27 11:17:58 EDT
Created attachment 283036 [details]
Dark toolbar color inconsistency

I have found one last issue with the dark theme toolbar (excluding the remaining Linux issue).

Reproducing this is a matter of losing focus on the view with the toolbar on the second row.  I investigated and determined that the color is being inherited from the .MPart.  Changing the .MPart CSS to match the color used on the second row fixes the problem.  Gerrit incoming.
Comment 57 Mike Marchand CLA 2020-05-27 11:19:10 EDT
Reopening
Comment 58 Eclipse Genie CLA 2020-05-27 11:20:07 EDT
New Gerrit change created: https://git.eclipse.org/r/163688
Comment 59 Amit Mendapara CLA 2020-05-28 04:04:20 EDT
I can confirm it fixed the background color issue as shown in Bug 563575.
Comment 60 Amit Mendapara CLA 2020-05-28 04:09:41 EDT
Sorry, it doesn't fix (In reply to Amit Mendapara from comment #59)
> I can confirm it fixed the background color issue as shown in Bug 563575.

Sorry, it doesn't fix the background Bug 563575. I tested with uncleaned sources (with my changes).
Comment 61 Lars Vogel CLA 2020-05-28 07:08:39 EDT
Created attachment 283047 [details]
Toolbar issue in search view screencast
Comment 62 Lars Vogel CLA 2020-05-28 07:20:25 EDT
Created attachment 283048 [details]
Screencast with fix in the search view
Comment 64 Lars Vogel CLA 2020-05-28 07:29:17 EDT
Thanks Mike. Found one more (existing) issue in this area and opened Bug 563667 for handling it. 

Thanks again for working on this.