Skip to content

Align dark theme form chrome with regular view styling#3949

Merged
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:dark-theme-form-chrome
May 1, 2026
Merged

Align dark theme form chrome with regular view styling#3949
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:dark-theme-form-chrome

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented Apr 30, 2026

On the dark theme, the form heading and section title bars were collapsing into the form body in editors and the editor-form text contrast was visibly worse than the dialog labels. The cause was a chain of overrides built on top of an INHERIT_FORCE hack on Form that forced children to inherit the body color, which the form heading then had to fight against in e4-dark_partstyle.css, and a broad .Editor Form Composite { #1E1F22 } rule that pushed the editor body away from the view body color and incidentally flattened the section trees.

This change unifies the dark theme form chrome with the existing .MPart Composite / .MPart Section view styling: split Form/FormHeading in e4-dark_globalstyle.css to #2F2F2F body / #f4f7f7 heading text, drop the swt-background-mode: 'force' hack, drop the now-unneeded .MPart FormHeading > ... counter-override in e4-dark_partstyle.css, align the Windows-specific .MPart Form { #4f5355 } block to #2F2F2F, and remove the redundant .Editor Form Composite block from the three platform-specific dark files. Net diff is +9 / -49 lines.

The dark theme rendered the form heading and section title bars
indistinguishably from the form body, and editor-form text contrast
was noticeably worse than the dialog labels (eclipse-platform#3945).

Bring the dark theme form chrome in line with the existing
".MPart Composite" / ".MPart Section" view styling and with dialog
label contrast:

- e4-dark_globalstyle.css: split the joint "Form, FormHeading" rule.
  Use #2F2F2F for both Form and FormHeading background-color (and the
  Form's text-background-color), matching the ".MPart Composite" body
  color used in views, and use #f4f7f7 for the FormHeading foreground
  for near-white dialog-level contrast. Drop the "swt-background-mode:
  'force'" hack on Form: it forced FormHeading children to inherit
  Form's body color, which is what required a counter-override in the
  partstyle. The light theme has never set this and works fine with
  INHERIT_DEFAULT.
- e4-dark_partstyle.css: remove the ".MPart FormHeading > ..." block.
  It was only needed to undo the FORCE inheritance and to hard-code
  #505f70 on the heading; with FORCE gone and the heading colors set
  in globalstyle, the block is redundant.
- e4-dark_win.css: change the Windows-specific ".MPart Form" block
  from #4f5355 to #2F2F2F so Form widgets on Windows align with the
  rest of the dark theme body color.

With these changes the previous editor-only override block
(".Editor Form Composite, .Editor Form Composite Tree,
.MPartStack.active .Editor Form Composite Tree { #1E1F22 }") in
e4-dark_{linux,mac,win}.css is no longer needed: ".MPart Composite"
already sets the form body to #2F2F2F, ".MPart Form Section Tree" sets
the section trees to #313538, and FormHeading is matched directly by
the FormHeading selector in globalstyle. Removing the override also
makes editor section trees match view section trees, which the broad
rule was inadvertently flattening.
@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented Apr 30, 2026

Linux Old:

image image image image

Linux New:

image image image image

Planning to test on Windows in the near future

@github-actions
Copy link
Copy Markdown
Contributor

Test Results

   852 files  ±0     852 suites  ±0   56m 1s ⏱️ +41s
 7 930 tests ±0   7 687 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 292 runs  ±0  19 637 ✅ ±0  655 💤 ±0  0 ❌ ±0 

Results for commit c808f5f. ± Comparison against base commit 2f4f230.

@BeckerWdf
Copy link
Copy Markdown
Member

@vogella: Which are the areas to look at most? Maybe you can mark them on your screenshots.

@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented Apr 30, 2026

@vogella: Which are the areas to look at most? Maybe you can mark them on your screenshots.

Basically everything is different (background color, no wrong background color of buttons, tab header)

@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented Apr 30, 2026

Here are a few "broken" things in the old theme, in addition the old colors are inconsistent with the other colors from the dark theme.

image image image image

@vogella vogella marked this pull request as ready for review April 30, 2026 18:15
@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented Apr 30, 2026

Windows old:

image

Windows neu:

image

Looks basically like the Linux one, so no extra screenshot.

Target editor has a white artifacts but this is unrelated to this change, was before the same.

image

@vogella vogella merged commit 748ccff into eclipse-platform:master May 1, 2026
18 checks passed
@vogella vogella deleted the dark-theme-form-chrome branch May 1, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants