Project: Eclipse_Platform_UI
Bug 186119 [Contributions] org.eclipse.ui.commands added to main.toolbar via menuContribution do not have a "flat" look on W2K
Reported: 2007-05-09 06:44:28 | Status: verified fixed

Build ID: I20070503-1400 Steps To Reproduce: 1. create a new plugin project using the sample rcp mail template application using eclipse 3.3 on a windows 2000 pc 2. add a org.eclipse.ui.commands 3. add extension point org.eclipse.ui.menus and add that command as menuContribution to the main toolbar (toolbar:org.eclipse.ui.main.toolbar?after=additions) 4. icon will be displayed but it does not have that "flat" look like the two existing buttons - regardless of which style attribute will be used at the menucontribution More information: Since we upgraded from 3.2.1 to 3.3M6 and further to 3.3M7 we have introduced org.eclipse.ui.commands, org.eclipse.ui.menus and org.eclipse.ui.handlers to replace all o.e.ui.ActionSets, o.e.ui.popUpMenus etc. Everything works well except the commands added to the with toolbar:org.eclipse.ui.main.toolbar using menuContributions do not have that flat look like as if they would been added to coolbar in the old programmatical way. Regardless which style attribute is set, the added commands always have a 3D-like style. To reproduce that problem we have extended the eclipse rcp mail template application by a org.eclipse.ui.command and a org.eclipse.ui.menus/menuContribution that adds that command to the org.eclipse.ui.main.toolbar. Snipplet of the plugin.xml <!-- start extension --> <extension point="org.eclipse.ui.commands"> <command defaultHandler="com.mobilkom.rcp.sample.mail.OpenMailboxHandler" id="com.mobilkom.rcp.sample.mail.openMailboxCommand" name="Open Mailbox"> </command> </extension> <extension point="org.eclipse.ui.menus"> <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions"> <toolbar id="mainToolbar"> <command commandId="com.mobilkom.rcp.sample.mail.openMailboxCommand" icon="icons/sample3.gif" label="Mailboxes (Command)"> </command> </toolbar> </menuContribution> </extension> <!-- end extension --> Regardless of the used style attribute (even if its empty) the added command always has a 3D-like look. This problems exists on Windows 2000, which is our primary platform but does not occur on Windows XP. We already made inital test on Windows Vista - the command looks flat, but seems to be a little bit lighter than the other button in the toolbar. It seems that the style attribute at the command attribute does not have any effect.

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/MenuAdditionCacheEntry.java