| Summary: | [CSS] Allow definition of Toolbar-Style in our ToolBarManagerRenderer using CSS | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Thomas Schindl <tom.schindl> |
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | bsd, bvenzal, hihn, remy.suen, wbeckwith |
| Version: | 4.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | stalebug | ||
|
Description
Thomas Schindl
Brian, I know you worked a lot lately with the CSS-Engine what do you think about adding an CSS-Property for this? CSS control of the label position would work great. Another addition that could/should be added would be a property to control the maximum length of a label in a toolbar. This will allow toolbar items to have a consistent spacing. Adding a property is easy to do (see [1] for details), but I'm not certain if/how a toolbar can be configured to show both images and labels. Remy has an example that does show both, but a cursory look through the javadocs for Toolbar and ToolItem didn't reveal anything to me, so it may be platform dependent. [1] http://wiki.eclipse.org/E4/CSS/Add_Styleable_Property isn't it just setting text on the ToolItem that makes the text visible? In org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.updateToolItem() we appear to be setting the text if it is set in model.getLocalizedLabel(); PW There are 2 different things you are mixing up: a) ToolItems by default show image & text if both are set (and I think do this) b) The displaying of Item and Text If one creates the Toolbar using SWT.RIGHT the label is displayed next to the icon, if you don't use that the label is displayed below! Please note the setting does NOT occur on the ToolItem but on the Toolbar (In reply to comment #5) > There are 2 different things you are mixing up: > a) ToolItems by default show image & text if both are set (and I think do this) > b) The displaying of Item and Text You're right Tom — I seem to have been misled from previous experiences adding Actions to a toolbar, where they are wrapped as ActionContributionItems and which suppress the text by default unless the ACI's mode is set to enable MODE_FORCE_TEXT. > If one creates the Toolbar using SWT.RIGHT the label is displayed next to > the icon, if you don't use that the label is displayed below! Please note > the > setting does NOT occur on the ToolItem but on the Toolbar I don't believe we can change the style bits after creation, can we? So we'd need to handle this via a new flag on MToolBar. With that, we could potentially add a property handler that would get the modelled element and then toggle the flag. Will this still make the 4.2 release? I hope so as the functionality exists in 3.x. Brian, Tom, if you can agree on a property and show me what to call, we could add this. In 3.x we differentiated between a view toolbar and a toolbar for the main coolbar. PW Hello, I really interested by this feature as we try to move from indigo to Kepler and the GUI of our existing product is using it. Is this done ? or is this plan to be done ? Thanks Bertrand This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |