Bug 564478 - Incorrect default "uncommitted changes background" on Dark Theme
Summary: Incorrect default "uncommitted changes background" on Dark Theme
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 5.8   Edit
Hardware: PC Mac OS X
: P3 minor (vote)
Target Milestone: 5.9   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 563540
  Show dependency tree
 
Reported: 2020-06-19 09:23 EDT by David Soles CLA
Modified: 2020-07-23 08:46 EDT (History)
5 users (show)

See Also:


Attachments
Project Explorer Stripes (58.39 KB, image/png)
2020-06-19 09:23 EDT, David Soles CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Soles CLA 2020-06-19 09:23:12 EDT
Created attachment 283356 [details]
Project Explorer Stripes

Project Explorer is showing some background stripes when using Dark Theme based on uncommitted git changes.
Comment 1 Lars Vogel CLA 2020-06-19 09:56:55 EDT
I think that comes from EGit. Thomas, please comment.
Comment 2 Andrew Obuchowicz CLA 2020-06-19 10:09:28 EDT
This is egit's uncommitted changes background color preference.

If possible, it could help to not use egit's uncommitted changes background color preference by default, and only use it in cases where the user set changed the color themselves. 

Hard coding this color preference to be the same as the platform dark theme will most likely break the light theme, and it would prevent custom eclipse theme plugin's from receiving the upstream fix.
Comment 3 Mickael Istria CLA 2020-06-19 10:12:11 EDT
> This is egit's uncommitted changes background color preference. 

Can't colors describe a "defaultTo" to inherit from like fonts do?
Comment 4 Andrew Obuchowicz CLA 2020-06-19 10:14:35 EDT
(In reply to Mickael Istria from comment #3)
> > This is egit's uncommitted changes background color preference. 
> 
> Can't colors describe a "defaultTo" to inherit from like fonts do?

I'm not sure I haven't looked into it. If someone else know's please chime in :) I'll look into it when I have a moment otherwise
Comment 5 Thomas Wolf CLA 2020-06-19 10:24:44 EDT
Looks like the dark theme changed its background color? Or maybe the EGit colors were never quite right.

The colors are configurable in Preferences->General->Appearance->Colors & Fonts, "Ignored resource(Background)" and "Uncommitted Change (Background)".

I'm not even sure EGit should define these colors in CSS; they're set in plugin.xml to refer to COLOR_LIST_FOREGROUND and COLOR_LIST_BACKGROUND, so if the theme switches, these colors should also switch automatically (unless customized by the user) and thus not need an override in /org.eclipse.egit.ui/css/e4-dark_egit_prefstyle.css .

Is that correct, Lars?
Comment 6 Thomas Wolf CLA 2020-06-19 10:41:30 EDT
But also see bug 430741 and bug 496585.
Comment 7 Lars Vogel CLA 2020-06-19 10:53:23 EDT
(In reply to Thomas Wolf from comment #5)
> Is that correct, Lars?

This could be validated via the preference spy from the e4 tools. Activate it, switch themes and see if the colors get adjusted.
Comment 8 Thomas Wolf CLA 2020-06-19 12:09:13 EDT
Just removing these two color pairs from the EGit CSS would indeed solve (on 2020-03) the background problem, but brings back the "black text on nearly black background" problem from bug 496585.

Given that my preferred resolution for this "WONTFIX". If the dark theme background color has changed between Neon and today, whatever change we make in the EGit CSS (such as updating the background to match current dark theme) will be wrong on some Eclipse version.

(Since the background changes correctly on 2020-03 when the CSS definitions in EGit are removed, I suppose the theme engine still has a bug somewhere about not updating COLOR_LIST_FOREGROUND correctly.)
Comment 9 Eclipse Genie CLA 2020-07-08 05:21:47 EDT
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/165993
Comment 11 Lars Vogel CLA 2020-07-23 08:46:49 EDT
Thanks, Thomas and Andrew.