Bug 165675

Summary: Support disabled image for MenuItem
Product: [Eclipse Project] Platform Reporter: Nick Edgar <n.a.edgar>
Component: SWTAssignee: Steve Northover <steve_northover>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: alexignaciodasilva, felix.hirsch, jean-michel_lemieux, pwebster
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Nick Edgar CLA 2006-11-23 11:23:05 EST
3.3 M3

On a ToolItem you can set a regular image as well as a disabled image (and a "hot" image too).

Currently, MenuItem supports only a regular image.

The graphic designers generally provide both regular and disabled images (the hand-tuned disabled images look much better than the ones that are auto-gen'ed either by JFace or SWT), but we're currently unable to use the disabled images.  

The difference is particularly noticeable when the same action appears in a tool bar and a menu (as is often the case in eclipse views).

Could MenuItem be enhanced to allow a disabled image (not sure if the "hot" image applies or not; probably not since I don't think you'd want a different image on arm in a menu item).

If this is addressed in SWT, the ActionContributionItem code should be fixed up to set it, and the schema for the org.eclipse.ui.popupMenus extension point should be extended to allow the disabledIcon attribute (as it already does for viewMenus, editorMenus and actionSets).  Turns out the PluginAction code already processes disabledIcon even though the schema disallows it, since it's common code with the other extension points.
Comment 1 Grant Gayed CLA 2006-11-24 10:40:09 EST
API request, SN to mull
Comment 2 Alex Ignácio da Silva CLA 2009-02-27 14:17:13 EST
This feature is particularly urgent on Windows, where the platform provided disabled icons look very bad in general.