Skip to content

Commit 748ccff

Browse files
committed
Align dark theme form chrome with regular view styling
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 (#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.
1 parent 27c8c9d commit 748ccff

5 files changed

Lines changed: 9 additions & 49 deletions

File tree

bundles/org.eclipse.ui.themes/css/dark/e4-dark_globalstyle.css

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -194,27 +194,24 @@ WebSite {
194194
color: #dddddd;
195195
}
196196

197-
Form,
198-
FormHeading {
199-
background-color: #505F70;
197+
Form {
198+
background-color: #2F2F2F;
200199
color: #9AC9D8;
201-
}
202200

203-
Form {
204201
/* Bug 465148: Additional styling for the Form */
205-
text-background-color: #505F70;
202+
text-background-color: #2F2F2F;
206203

207204
tb-toggle-hover-color: #313538;
208205
tb-toggle-color: #313538;
209206
h-hover-full-color: #313538;
210207
h-hover-light-color: #313538;
211208
h-bottom-keyline-2-color: #313538;
212209
h-bottom-keyline-1-color: #313538;
210+
}
213211

214-
/* We also have to force the background mode (the
215-
* Label/ToolBar in the heading should inherit it).
216-
*/
217-
swt-background-mode: 'force';
212+
FormHeading {
213+
background-color: #2F2F2F;
214+
color: #f4f7f7;
218215
}
219216

220217
Section {

bundles/org.eclipse.ui.themes/css/dark/e4-dark_partstyle.css

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -94,22 +94,6 @@
9494
color: #BBBBBB;
9595
}
9696

97-
.MPart FormHeading,
98-
.MPart FormHeading > TitleRegion,
99-
.MPart FormHeading > TitleRegion > Label,
100-
.MPart FormHeading > TitleRegion > StyledText {
101-
background-color: #505f70;
102-
color: #9ac9d8;
103-
}
104-
105-
.MPart FormHeading,
106-
.MPart FormHeading > TitleRegion {
107-
swt-background-mode: none;
108-
}
109-
.MPart FormHeading > CLabel {
110-
background-color: #505f70;
111-
}
112-
11397
.MPartFormHeaderCLabelError {
11498
color:'#org-eclipse-ui-workbench-FORM_HEADING_ERROR_COLOR';
11599
}

bundles/org.eclipse.ui.themes/css/e4-dark_linux.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,6 @@ ImageBasedFrame,
112112
swt-selected-highlight-top: true;
113113
}
114114

115-
.Editor Form Composite,
116-
.Editor Form Composite Tree,
117-
.MPartStack.active .Editor Form Composite Tree
118-
{
119-
background-color: #1E1F22;
120-
}
121-
122115
#org-eclipse-e4-ui-compatibility-editor Canvas,
123116
#org-eclipse-e4-ui-compatibility-editor Canvas > *
124117
{

bundles/org.eclipse.ui.themes/css/e4-dark_mac.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,6 @@ Button {
9898
swt-selected-highlight-top: true;
9999
}
100100

101-
.Editor Form Composite,
102-
.Editor Form Composite Tree,
103-
.MPartStack.active .Editor Form Composite Tree
104-
{
105-
background-color: #1E1F22;
106-
}
107-
108101
#org-eclipse-e4-ui-compatibility-editor Canvas,
109102
#org-eclipse-e4-ui-compatibility-editor Canvas > *
110103
{

bundles/org.eclipse.ui.themes/css/e4-dark_win.css

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ ImageBasedFrame,
101101
.MPartStack.active .MPart Form DependenciesComposite,
102102
.MPartStack.active .MPart Form ListEditorComposite,
103103
.MPartStack.active .MPart Form Text[style~='SWT.READ_ONLY'],
104-
.MPartStack.active .MPart Form DependenciesComposite > SashForm > Section > * { /* Section > DependenciesComposite$... */
105-
background-color: #4f5355;
104+
.MPartStack.active .MPart Form DependenciesComposite > SashForm > Section > * { /* Section > DependenciesComposite$... */
105+
background-color: #2F2F2F;
106106
color: #f4f7f7;
107107
}
108108
#org-eclipse-help-ui-HelpView Form,
@@ -180,13 +180,6 @@ ImageBasedFrame,
180180
swt-selected-highlight-top: true;
181181
}
182182

183-
.Editor Form Composite,
184-
.Editor Form Composite Tree,
185-
.MPartStack.active .Editor Form Composite Tree
186-
{
187-
background-color: #1E1F22;
188-
}
189-
190183
#org-eclipse-e4-ui-compatibility-editor Canvas,
191184
#org-eclipse-e4-ui-compatibility-editor Canvas > *
192185
{

0 commit comments

Comments
 (0)