Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 186119 - [Contributions] org.eclipse.ui.commands added to main.toolbar via menuContribution do not have a "flat" look on W2K
Summary: [Contributions] org.eclipse.ui.commands added to main.toolbar via menuContri...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows 2000
: P3 normal with 1 vote (vote)
Target Milestone: 3.3 RC1   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-09 06:44 EDT by Robert Reinhardt CLA
Modified: 2007-05-18 08:32 EDT (History)
2 users (show)

See Also:
emoffatt: review+


Attachments
screenshot of rcp mail template extended by a command displayed in the main toolbar (9.14 KB, image/png)
2007-05-09 06:45 EDT, Robert Reinhardt CLA
no flags Details
Menu Contribution Toolbars v01 (8.36 KB, patch)
2007-05-14 08:37 EDT, Paul Webster CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Reinhardt CLA 2007-05-09 06:44:28 EDT
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.
Comment 1 Robert Reinhardt CLA 2007-05-09 06:45:51 EDT
Created attachment 66426 [details]
screenshot of rcp mail template extended by a command displayed in the main toolbar

attached screenshot shows our problem
Comment 2 Paul Webster CLA 2007-05-14 08:37:08 EDT
Created attachment 67041 [details]
Menu Contribution Toolbars v01

use the same method to create the menu contribution as used by the workbench window.

PW
Comment 3 Paul Webster CLA 2007-05-14 08:38:11 EDT
Eric, could you please review this patch?

PW
Comment 4 Eric Moffatt CLA 2007-05-14 10:17:54 EDT
Paul, it looks good to me (except for the spurious formatting changes..;-).

+1
Comment 5 Paul Webster CLA 2007-05-14 10:40:14 EDT
Released in HEAD >20070514
PW
Comment 6 Paul Webster CLA 2007-05-16 11:06:13 EDT
In I20070516-0010
PW

Robert, if you could check with this build as well that would be great.
Comment 7 Robert Reinhardt CLA 2007-05-18 08:32:27 EDT
I 've tested the rcp mail sample application plus our application with I20070517-0010. 

Looks good, buttons are displayed with the flat look.

many thanks!
Robert