Bug 578611 - Dark mode inconsistencies in EGit views
Summary: Dark mode inconsistencies in EGit views
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 6.1   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 6.1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 578758 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-02-07 04:21 EST by Thomas Wolf CLA
Modified: 2022-02-18 04:50 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wolf CLA 2022-02-07 04:21:28 EST
It appears that in dark mode, normal background for views and editors is #2F2F2F (decimal 47,47,47), also for views showing trees (package explorer, Git Repositories vies, Outline view).

Trees and tables inside Forms appear to use #323538 as background (see for instance PDE's manifest editor, Overview, Execution Environments).

In EGit views, I see a number of inconsistencies:

Staging View:

- Commit message editor has background #323538, would expect #2F2F2F
- staged/unstaged #383A3B (56,58,59). Would have expected #323538;

History:

- Commit table, file tree: #323538
- Commit message viewer/file diff: #404447 (64,68,71); the containing Composite
  does has #2F2F2F as background (visible between the two text areas).


Expected:

- All commit message editors or viewers use the normal #2F2F2F background.
- All diff viewers use #2F2F2F.
- All tables/trees inside forms use the default #323538, otherwise #2F2F2F

The general Eclipse theme could maybe consider not using #323538 for trees/tables inside forms, but also #2F2F2F.

Otherwise, EGit could consider using #2F2F2F explicitly for the trees/tables in the history and staging views; it'd be more consistent with the package explorer or outline view, where the trees also have #2F2F2F as background.
Comment 1 Eclipse Genie CLA 2022-02-07 05:13:37 EST
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/190515
Comment 2 Thomas Wolf CLA 2022-02-07 05:38:03 EST
(In reply to Eclipse Genie from comment #1)
> New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/190515
This fixes the background of the commit message editor in the staging view.

I have _no_ idea where the #404447 in the history view, commit message and diff viewer bottom left, comes from. The HyperlinkSourceViewer listens to prefernce changes and does set the background color to #2F2F2F. There must be something else that overrides this, but what?

I also don't see where #383A3B for the staged/unstaged trees in the staging view come from. These are trees inside form sections, so I would have expected #323538.

@Lars, can you help here?
Comment 3 Lars Vogel CLA 2022-02-07 07:56:27 EST
(In reply to Thomas Wolf from comment #2)
> (In reply to Eclipse Genie from comment #1)
> > New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/190515
> This fixes the background of the commit message editor in the staging view.
> 
> I have _no_ idea where the #404447 in the history view, commit message and
> diff viewer bottom left, comes from. The HyperlinkSourceViewer listens to
> prefernce changes and does set the background color to #2F2F2F. There must
> be something else that overrides this, but what?
> 
> I also don't see where #383A3B for the staged/unstaged trees in the staging
> view come from. These are trees inside form sections, so I would have
> expected #323538.
> 
> @Lars, can you help here?

There is an entry in the e4-dark-drag-styling.css file

.MPart Section Tree {
	background-color: #2F2F2F;
    color: #DDDDDD;
}

I opened Bug 578617 to improve the default dark theme settings.
Comment 4 Thomas Wolf CLA 2022-02-07 08:04:20 EST
#404447 in the history view comes from e4_dark_partstyle.css, which has

.MPart DatePicker,
.MPart DatePicker > Text,
.MPart ScheduleDatePicker,
.MPart ScheduleDatePicker > Text,
.MPart CCombo,
.MPart Spinner,
.MPart Composite > StyledText,
.MPart PageBook > SashForm Label,
.MPart SashForm > Text[style~='SWT.BORDER'] {
    background-color: #3f4447;
    color: #BBBBBB;
}

(Don't know why on my Mac the red component is 0x40 instead of 0x3f when rendered.)

The ".MPart Composite > StyledText" causes this.
Comment 5 Eclipse Genie CLA 2022-02-07 08:08:28 EST
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/190525
Comment 6 Eclipse Genie CLA 2022-02-07 11:03:51 EST
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/190530
Comment 10 Thomas Wolf CLA 2022-02-18 04:50:48 EST
*** Bug 578758 has been marked as a duplicate of this bug. ***