Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 372448 - [CSS] Colour mismatch in the workbench toolbar
Summary: [CSS] Colour mismatch in the workbench toolbar
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: candidate43
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-23 23:05 EST by Wayne Beaton CLA
Modified: 2014-08-04 16:28 EDT (History)
6 users (show)

See Also:


Attachments
The "Before" (7.42 KB, image/png)
2012-02-23 23:06 EST, Wayne Beaton CLA
no flags Details
The "After" (5.64 KB, image/png)
2012-02-23 23:07 EST, Wayne Beaton CLA
no flags Details
Proper toolbar (30.21 KB, image/png)
2012-02-29 18:08 EST, Bogdan Gheorghe CLA
no flags Details
Fedora 14 Snapshot I20120229-2200 (361.50 KB, image/png)
2012-03-01 12:36 EST, Bogdan Gheorghe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wayne Beaton CLA 2012-02-23 23:05:17 EST
On Linux (Fedora 14), the individual ToolBars stand out on workbench window tool bar (I'll attach a screenshot).

The CSS (/org.eclipse.platform/css/e4_default_gtk.css) specifies a background image for the tool bar:

.MTrimBar#org-eclipse-ui-main-toolbar  {
    background-image:  url(./gtkGrey.PNG);	
}

AFAIK, the background of the ToolBar cannot be set to transparent which would allow the gtkgrey.PNG image to show through; it has to be set to a colour.

The simple fix seems to be to remove the image and instead set the tool bar and embedded ToolBars to a specific colour:

.MTrimBar#org-eclipse-ui-main-toolbar  {
	background-color: #E2E2E2;
}

.MTrimBar#org-eclipse-ui-main-toolbar ToolBar {
	background-color: #E2E2E2;
}

Thoughts?
Comment 1 Wayne Beaton CLA 2012-02-23 23:06:16 EST
Created attachment 211555 [details]
The "Before"
Comment 2 Wayne Beaton CLA 2012-02-23 23:07:02 EST
Created attachment 211556 [details]
The "After"
Comment 3 Paul Webster CLA 2012-02-24 07:13:49 EST
Good question, why do we use images instead of just colour?

PW
Comment 4 Michael Woski CLA 2012-02-28 16:37:28 EST
Generally, how does this CSS thingie integrate into the different Desktop environments?

I mean CSS might be nice and all, but it's a major flaw if you stop the realisation at a technical level. At the current stage e4 simply does not integrate well into its surrounding from a visual POV. However, since bad styling is something that bites you every time you look at it, it should become a major concern - at least IMHO.

That said, I don't have just an issue with background colours, but what about fonts? In my case, the ViewPart title font is 3-times as big as my standard font, not speaking of the different font styles. The size problem stems from the fact that in reality you have to deal with different pixel densities (my screen has ~150dpi) and font size 12 is not always what you want.
This pretty much reminds me of Gnome 3, where the technical groundwork has been layed out, but in essence it simply looks plain horrible.

Also, those css files do not belong into the program path, especially in a multi-user environment ...

One last thing, where exactly has the line been drawn between "native" and "styled" widgets? For me the E4 workbench looks like one piece of patchwork in that respect.

sorry for the rantish writing (I don't mean it ;), but the workbench design really bites me every time I look at it ...
bye Michi
Comment 5 Bogdan Gheorghe CLA 2012-02-29 18:07:37 EST
Wayne, this looks like a problem with our background painting on Fedora 14. This looks OK on other distros including Ubuntu and Fedora 15. The reason we use an image instead of a color is to get the gradient effect on the toolbar (which matches the ones used on the other platforms). If everything is working properly, you wouldn't get the mismatched items - the image should draw properly since we  set the background mode to SWT.INHERIT_DEFAULT.

I'm setting up a Fedora 14 image and I'll take a look at what's going on.
Comment 6 Bogdan Gheorghe CLA 2012-02-29 18:08:10 EST
Created attachment 211848 [details]
Proper toolbar

Toolbar on Ubuntu
Comment 7 Bogdan Gheorghe CLA 2012-03-01 12:36:42 EST
Created attachment 211899 [details]
Fedora 14 Snapshot I20120229-2200

Toolbar seems OK on my newly installed Fedora 14 (just a default install). Wayne, are you using any custom themes? Anything out of the default? I'm sure there must be a way to get the same thing you are seeing.
Comment 8 Wayne Beaton CLA 2012-03-01 12:48:22 EST
(In reply to comment #7)
> Created attachment 211899 [details]
> Fedora 14 Snapshot I20120229-2200
> 
> Toolbar seems OK on my newly installed Fedora 14 (just a default install).
> Wayne, are you using any custom themes? Anything out of the default? I'm sure
> there must be a way to get the same thing you are seeing.

AFAIK, other than a custom background image, I am using the defaults. I'll poke around a bit and see if I messed with anything.
Comment 9 Wayne Beaton CLA 2012-03-01 14:19:23 EST
So I did have a custom theme. Here's the contents of the theme file:

--
[Desktop Entry]
Name=Wayne's Theme
Type=X-GNOME-Metatheme
Comment=The theme installed on my Fedora 14 box.

[X-GNOME-Metatheme]
GtkTheme=Glider
MetacityTheme=Clearlooks
IconTheme=gnome
GtkColorScheme=fg_color:#000,bg_color:#eae8e3,base_color:#fff,text_color:#000,selected_bg_color:#7590ae,selected_fg_color:#fff,tooltip_bg_color:#FFF1BE,tooltip_fg_color:#000
CursorTheme=default
CursorSize=18
NotificationTheme=slider
--

When I switch themes, everything starts to look better again (I still don't like the background image on the tool bar, but I believe it appears as expected).

I think it might be the "GtkTheme=Glider" bit that's causing the fun. When I select the "Glider" theme, I get a similar effect. Other themes look generally good, however (I only have default themes installed).

I can post some addition screen shots if you think that it'll add value.
Comment 10 Krzysztof Daniel CLA 2012-04-10 04:46:25 EDT
May this be related to bug 376102?
Comment 11 Lars Vogel CLA 2014-07-03 16:21:16 EDT
Wayne, do you still see this?
Comment 12 Lars Vogel CLA 2014-08-04 16:28:36 EDT
(In reply to Lars Vogel from comment #11)
> Wayne, do you still see this?

Marking as WORKSFORME, please reopen if you see this issue.