Community
Participate
Working Groups
The mockups for the default e4 style include some margins - below the toolbar, on the left and right, underneath. In the short run we should hack in some margins so that things look a little less cramped by default. In the long run, the trim margins (as well as the gutters between part stacks) need to be stylable.
For now I've done the following: - TrimPartLayout now has public fields for gutterTop, gutterBottom, gutterRight, gutterLeft - WBWRenderer hard-codes these to values that match the mockups To be done: - decide where these values would be defined in the CSS.
Note that the demos now also have "breathing room".
Please ensure this is configurable: it makes e4 RCP apps look terrible, IMHO.
(In reply to comment #4) > Please ensure this is configurable: it makes e4 RCP apps look terrible, IMHO. The next step is to make this stylable.
Created attachment 169009 [details] work in progress patch This patch retrieves the margin values from the CSSEngine in order to set the layout margins for the WBW. Discussed this approach with Eric and Bogdan. For now we will mercilessly reach for a theme manager and its CSSEngine and grab the values from there. This patch demonstrates how other renderers could get the margin values. We may want to come up with something a little nicer (wrap all this up in a helper class) so that at least this wad of code isn't being copied everywhere. Bogdan - can you have a look? It's not finding the MWindow values in the CSS but maybe since I'm setting the cssinfo on the fly just before retrieving the values, something is missing? (Or I've made a dumb mistake)...
OK, I have this working in my workspace. I'll clean it up and attach the patch here.
Created attachment 169372 [details] Take 2 To get this to work, you need to add the following CSS to e4_default.css: .MTrimmedWindow { margin-top: 12px; margin-bottom: 2px; margin-left: 10px; margin-right: 10px; }
Thanks, Bogdan! Fixed in HEAD >20100520. I've made a CSSEngineHelper that can be used to retrieve values given a particular control and IEclipseContext. At least this way we can bury the details about going through the theme engine and the CSS implementation details.
(In reply to comment #4) > Please ensure this is configurable: it makes e4 RCP apps look terrible, IMHO. Brian, the margins will now default to 0 unless specified in the stylesheet.