This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 430706 - [CSS] Buttons, Tabs and some text fields not styled in dark theme on Mac
Summary: [CSS] Buttons, Tabs and some text fields not styled in dark theme on Mac
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: 4.4 M7   Edit
Assignee: Andrea Guarinoni CLA
QA Contact: Daniel Rolka CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-19 11:24 EDT by Stefan Winkler CLA
Modified: 2014-04-09 03:16 EDT (History)
2 users (show)

See Also:


Attachments
Showing the Quick Access field (Upper left corner) with unreadable input (73.53 KB, image/jpeg)
2014-03-19 11:24 EDT, Stefan Winkler CLA
no flags Details
Preferences dialog showing buttons and filter text w/ unstyled background (570.60 KB, image/jpeg)
2014-03-19 11:26 EDT, Stefan Winkler CLA
no flags Details
Search Dialog showing buttons and tabfolders with unstyled background (309.74 KB, image/jpeg)
2014-03-19 11:27 EDT, Stefan Winkler CLA
no flags Details
Screenshot showing the canvas w/ light gray background (598.94 KB, image/jpeg)
2014-03-20 14:46 EDT, Stefan Winkler CLA
no flags Details
Styling of Combos (64.94 KB, image/jpeg)
2014-03-21 00:12 EDT, Stefan Winkler CLA
no flags Details
Styling of Combos (64.94 KB, image/jpeg)
2014-03-21 00:15 EDT, Stefan Winkler CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Winkler CLA 2014-03-19 11:24:24 EDT
Created attachment 241014 [details]
Showing the Quick Access field (Upper left corner) with unreadable input

I am running Luna M6 and tries out the dark theme on my Mac (10.9.2), Java 1.7.0_45.

When I switch to dark theme and restart as suggested, some elements are not styled:

- TabFolder 
- Button (SWT.PUSH)
- Some text fields (e.g. QuickSearch and Filter Texts)

In all three cases, the text color seems to by styled correctly, but the background color is not, which makes the text nearly or even completely unreadable.

See attached screenshots.
Comment 1 Stefan Winkler CLA 2014-03-19 11:26:00 EDT
Created attachment 241015 [details]
Preferences dialog showing buttons and filter text w/ unstyled background
Comment 2 Stefan Winkler CLA 2014-03-19 11:27:00 EDT
Created attachment 241016 [details]
Search Dialog showing buttons and tabfolders with unstyled background
Comment 3 Lars Vogel CLA 2014-03-19 22:15:10 EDT
Can you try the latest integration build? After M6 we added Mac specific stylesheets.
Comment 4 Stefan Winkler CLA 2014-03-20 12:21:47 EDT
I updated to I20140318-0830. Now the text is readable.
Thanks.

I reckon that the background colors for the affected widgets are not settable in Max OS X? The background color still sticks a bit out in the otherwise quite dark theme.

Also, the background color of the composite in a UIJob showing in a progress monitor dialog, if you expand the "Details >>", is still light grey.
Comment 5 Lars Vogel CLA 2014-03-20 12:33:45 EDT
(In reply to Stefan Winkler from comment #4)
> Also, the background color of the composite in a UIJob showing in a progress
> monitor dialog, if you expand the "Details >>", is still light grey.

Thanks for testing. Can you attach a screenshot of this dialog? How to you trigger that dialog?
Comment 6 Stefan Winkler CLA 2014-03-20 14:46:24 EDT
Created attachment 241068 [details]
Screenshot showing the canvas w/ light gray background

This is the screenshot showing the affected composite.

You can trigger it by going to Help->Install new Software ... 
Then select any feature to install, go through the wizard until Finish.
When you press finish, you get this dialog, which you can expand by clicking the "Details >>" Button. (I guess that any other UIJob triggered by any plugin might have a similar problem).
Comment 7 Timo Kinnunen CLA 2014-03-20 19:02:30 EDT
(In reply to comment #6)

> (I guess that any other UIJob triggered by any plugin might
> have a similar problem).

As well as the Progress view itself.
Comment 8 Lars Vogel CLA 2014-03-20 19:05:55 EDT
(In reply to Stefan Winkler from comment #6)
> Created attachment 241068 [details]
> Screenshot showing the canvas w/ light gray background
> 
> This is the screenshot showing the affected composite.
> 
> You can trigger it by going to Help->Install new Software ... 

Andrea, can you upload a Gerrit view to fix that?
Comment 9 Andrea Guarinoni CLA 2014-03-20 19:47:03 EDT
(In reply to Lars Vogel from comment #8)
> (In reply to Stefan Winkler from comment #6)
> > Created attachment 241068 [details]
> > Screenshot showing the canvas w/ light gray background
> > 
> > This is the screenshot showing the affected composite.
> > 
> > You can trigger it by going to Help->Install new Software ... 
> 
> Andrea, can you upload a Gerrit view to fix that?

There is already a dark style for that Progress element background, but it is ignored by CSS engine. You can verify it by triggering CSS Spy on it. 
We need to look at CSS/SWT implementation to fix it.
Comment 10 Timo Kinnunen CLA 2014-03-20 23:53:12 EDT
I created a workaround for Progress View which kinda looks like it's working properly if you don't look too closely, but it has a huge drawback: every time there's an update the items flicker to white and back. Which is all the time. This too points to proper solution being fixing the components and their hard-coded colors.

Another huge drawback it has is it's a totally unmaintainable mess:

#org-eclipse-ui-views-ProgressView .MPart > Composite > ScrolledComposite, 
#org-eclipse-ui-views-ProgressView .MPart > Composite > ScrolledComposite > Composite,
#org-eclipse-ui-views-ProgressView .MPart > Composite > ScrolledComposite > Composite > ProgressInfoItem {
background-color: #48585e #284049 100.0% true;
}
#org-eclipse-ui-views-ProgressView .MPart > Composite > ScrolledComposite > Composite > ProgressInfoItem > Label {
background-color: #44555c #394c54 100.0% true;
}
#org-eclipse-ui-views-ProgressView .MPart > Composite > ScrolledComposite > Composite > ProgressInfoItem > ToolBar {
background-color: #44555c #334850 100.0% true;
}
#org-eclipse-ui-views-ProgressView .MPart > Composite > ScrolledComposite > Composite > ProgressInfoItem > Link {
background-color: #344951 #284049 100.0% true;
}
#org-eclipse-ui-views-ProgressView .MPart.active > Composite > ScrolledComposite, 
#org-eclipse-ui-views-ProgressView .MPart.active > Composite > ScrolledComposite > Composite,
#org-eclipse-ui-views-ProgressView .MPart.active > Composite > ScrolledComposite > Composite > ProgressInfoItem {
background-color: #1eade3 #1b7597 100.0% true;
}
#org-eclipse-ui-views-ProgressView .MPart.active > Composite > ScrolledComposite > Composite > ProgressInfoItem > Label {
background-color: #1da7db #1c93bf 100.0% true;
}
#org-eclipse-ui-views-ProgressView .MPart.active > Composite > ScrolledComposite > Composite > ProgressInfoItem > ToolBar {
background-color: #1da7db #1c88b1 100.0% true; 
}
#org-eclipse-ui-views-ProgressView .MPart.active > Composite > ScrolledComposite > Composite > ProgressInfoItem > Link {
background-color: #1c8bb5 #1b7597 100.0% true; 
}
Comment 11 Stefan Winkler CLA 2014-03-21 00:12:12 EDT
Created attachment 241082 [details]
Styling of Combos

Here's another one that is not optimal:

Combos w/o SWT.READ_ONLY are rendered with dark bg and dark text (compared to Text widgets which have dark bg and light text). (see (1))

Combos need dark text if they are SWT.READ_ONLY (see (2)).

Obviously, when Combos are open, the list has a light foreground and this needs dark text as well. (see (3)).

I wanted to fix (1) so I went forward and tried to modify the rules

Combo
to
Combo[style~='SWT.READONLY']

This fixed (1) - (see (4)). 
But obviously broke (3) - (see (5)).

Is there a way to have both (4) and (3) at the same time? Or is this a limitation of the current Mac OS SWT implementation?
Comment 12 Stefan Winkler CLA 2014-03-21 00:15:36 EDT
Created attachment 241083 [details]
Styling of Combos

Here's another one that is not optimal:

Combos w/o SWT.READ_ONLY are rendered with dark bg and dark text (compared to Text widgets which have dark bg and light text). (see (1))

Combos need dark text if they are SWT.READ_ONLY (see (2)).

Obviously, when Combos are open, the list has a light foreground and this needs dark text as well. (see (3)).

I wanted to fix (1) so I went forward and tried to modify the rules

Combo
to
Combo[style~='SWT.READONLY']

This fixed (1) - (see (4)). 
But obviously broke (3) - (see (5)).

Is there a way to have both (4) and (3) at the same time? Or is this a limitation of the current Mac OS SWT implementation?
Comment 13 Andrea Guarinoni CLA 2014-04-07 10:42:32 EDT
As far as I see, it's a limit of the current implementation of that SWT widget.

A simple CSS patch is: https://git.eclipse.org/r/#/c/24538/
Can you try if it reduces the issue for now?

TabFolder occurrencies instead, in my opinion should be switched to CTabFolder widget that provides the same functionalities and is intended to be customizable.
Comment 14 Lars Vogel CLA 2014-04-09 03:16:36 EDT
(In reply to Andrea Guarinoni from comment #13)

> A simple CSS patch is: https://git.eclipse.org/r/#/c/24538/

Daniel release the fix with https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=e6b327f789dedc8d8ad831a043ea672f25b87702