Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319805

Summary: Right and left trim should not have gradient styling
Product: [Eclipse Project] e4 Reporter: Susan McCourt <susan>
Component: UIAssignee: Susan McCourt <susan>
Status: VERIFIED FIXED QA Contact: Susan McCourt <susan>
Severity: normal    
Priority: P3 CC: bokowski, emoffatt, gheorghe
Version: 1.0   
Target Milestone: 1.0 RC2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 293481    
Attachments:
Description Flags
screen snap showing original problem and the fixed version
none
patch none

Description Susan McCourt CLA 2010-07-13 22:34:07 EDT
win7, I20100713-2016
I maximized an editor and was surprised that the left and right trim (containing the minimized views) was blue.  

We need to style these like the bottom trim.
Is this a stylesheet or model property issue?
Comment 1 Susan McCourt CLA 2010-07-14 15:10:45 EDT
I've seen two variants of this, both when I have an editor maximized.

Variant 1:
the left and right trim bars have the blue gradient.  That is, the background behind the minimized view tool buttons is blue, as is the background of the unused trim bar.

Variant 2:
the tool bar that has the buttons for minimized view is a gray color (but not the color of the background of main window) and then the unused part of the trim bar is the blue gradient.

What we'd like to achieve is that left and right look like the bottom.
Comment 2 Susan McCourt CLA 2010-07-14 18:26:25 EDT
Created attachment 174357 [details]
screen snap showing original problem and the fixed version
Comment 3 Susan McCourt CLA 2010-07-14 18:33:26 EDT
Created attachment 174358 [details]
patch

This patch
- changes GenericTrimContainerImpl so that it tags itself with the name of its side
- changes all of the stylesheets so that .MTrimBar uses the same background color as the .MTrimmedWindow, and only .MTrimBar.Top uses the background gradient (or in the case of mac, special background color).

I realize that using the sides as the tags is a hack.
In a world where the user could put the "application toolbar" wherever they wanted, we would not use the side to determine styling.  But since we don't have any kind of representation for "the trimbar that is the main app toolbar" apart from its side, that is what I went with.

If someone (Eric?) knows a better way to tag the toolbar semantically so that we aren't using the side, that's fine with me.  

I also realized that the reason the bottom trim doesn't have this problem, is that we don't have any model element representing the bottom trim.  The workbench window merely grabs the bottom composite from the TrimPartLayout and creates widgets on it.  So any styling done specifically for the bottom would be ignored anyway.

This is what made me okay with my hack...we don't have a consistent trim model in the SDK workbench anyway...
Comment 4 Susan McCourt CLA 2010-07-14 19:41:47 EDT
Comment on attachment 174358 [details]
patch

Bogdan explained a better way for me to achieve this, using the existing id rather than the side tag hack.
Comment 5 Susan McCourt CLA 2010-07-14 19:45:27 EDT
(In reply to comment #3)
> But since we don't
> have any kind of representation for "the trimbar that is the main app toolbar"
> apart from its side, that is what I went with.

Actually, we do have a representation for this, the id "org-eclipse-ui-main-toolbar".

So the fix requires no code change, just the styling changes described above:
- .MTrimBar gets the same background color as .MTrimmedWindow
- .MTrimBar#org-eclipse-ui-main-toolbar gets the gradient or color that we used to give to .MTrimBar.

Since this is not a code change and much less hacky, I'm removing the review flags and committing the stylesheet changes.  We will want to test each theme on its appropriate platform, but all the themes are behaving properly for me now on Win7.
Comment 6 Susan McCourt CLA 2010-07-27 13:53:11 EDT
verified on Win7, Build id: I20100726-2152