Skip to content

Commit 8ae0581

Browse files
committed
Use on-the-fly disabled icons in org.eclipse.ui (incl. shared images)
This replaces the usage of pre-generated disabled icons from the org.eclipse.ui, org.eclipse.ui.editors, org.eclipse.ui.genericeditor and org.eclipse.ui.workbench.texteditor bundles with on-the-fly generated disabled images. It also adapts the initialization of shared images to programmatically create the disabled versions of the icons.
1 parent 6683c3f commit 8ae0581

File tree

7 files changed

+71
-101
lines changed

7 files changed

+71
-101
lines changed

bundles/org.eclipse.ui.editors/plugin.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@
152152
<extension point="org.eclipse.ui.commandImages">
153153
<image
154154
commandId="org.eclipse.ui.edit.text.folding.collapse_all"
155-
disabledIcon="$nl$/icons/full/dlcl16/collapseall.png"
156155
icon="$nl$/icons/full/elcl16/collapseall.png">
157156
</image>
158157
<image
@@ -511,7 +510,6 @@
511510
toolbarPath="org.eclipse.ui.workbench.navigate/history.group"
512511
class="org.eclipse.ui.internal.editors.text.PreviousPulldownActionDelegate"
513512
definitionId="org.eclipse.ui.navigate.previous"
514-
disabledIcon="$nl$/icons/full/dtool16/prev_nav.png"
515513
icon="$nl$/icons/full/etool16/prev_nav.png"
516514
label="%goToPreviousAnnotation.label"
517515
retarget="true"
@@ -524,7 +522,6 @@
524522
toolbarPath="org.eclipse.ui.workbench.navigate/history.group"
525523
class="org.eclipse.ui.internal.editors.text.NextPulldownActionDelegate"
526524
definitionId="org.eclipse.ui.navigate.next"
527-
disabledIcon="$nl$/icons/full/dtool16/next_nav.png"
528525
icon="$nl$/icons/full/etool16/next_nav.png"
529526
label="%goToNextAnnotation.label"
530527
retarget="true"
@@ -540,7 +537,6 @@
540537
id="org.eclipse.ui.edit.text.gotoNextEditPosition"
541538
class="org.eclipse.ui.texteditor.GotoNextEditPositionAction"
542539
definitionId="org.eclipse.ui.edit.text.gotoNextEditPosition"
543-
disabledIcon="$nl$/icons/full/dtool16/next_edit_pos.png"
544540
icon="$nl$/icons/full/etool16/next_edit_pos.png"
545541
helpContextId="org.eclipse.ui.goto_next_edit_position_action_context"
546542
label="%goToNextEditPosition.label"
@@ -553,7 +549,6 @@
553549
id="org.eclipse.ui.edit.text.gotoLastEditPosition"
554550
class="org.eclipse.ui.texteditor.GotoLastEditPositionAction"
555551
definitionId="org.eclipse.ui.edit.text.gotoLastEditPosition"
556-
disabledIcon="$nl$/icons/full/dtool16/last_edit_pos.png"
557552
icon="$nl$/icons/full/etool16/last_edit_pos.png"
558553
helpContextId="org.eclipse.ui.goto_last_edit_position_action_context"
559554
label="%goToLastEditPosition.label"

bundles/org.eclipse.ui.genericeditor/plugin.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@
167167
point="org.eclipse.ui.commandImages">
168168
<image
169169
commandId="org.eclipse.ui.genericeditor.togglehighlight"
170-
disabledIcon="icons/full/dtool16/mark_occurrences.png"
171170
icon="icons/full/etool16/mark_occurrences.png">
172171
</image>
173172
</extension>

bundles/org.eclipse.ui.workbench.texteditor/plugin.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -521,27 +521,22 @@
521521
</image>
522522
<image
523523
commandId="org.eclipse.ui.edit.text.toggleShowWhitespaceCharacters"
524-
disabledIcon="$nl$/icons/full/dtool16/show_whitespace_chars.png"
525524
icon="$nl$/icons/full/etool16/show_whitespace_chars.png">
526525
</image>
527526
<image
528527
commandId="org.eclipse.ui.edit.text.toggleWordWrap"
529-
disabledIcon="$nl$/icons/full/dtool16/wordwrap.png"
530528
icon="$nl$/icons/full/etool16/wordwrap.png">
531529
</image>
532530
<image
533531
commandId="org.eclipse.ui.edit.text.toggleBlockSelectionMode"
534-
disabledIcon="$nl$/icons/full/dtool16/block_selection_mode.png"
535532
icon="$nl$/icons/full/etool16/block_selection_mode.png">
536533
</image>
537534
<image
538535
commandId="org.eclipse.ui.edit.text.upperCase"
539-
disabledIcon="icons/full/dtool16/toUpper.png"
540536
icon="icons/full/etool16/toUpper.png">
541537
</image>
542538
<image
543539
commandId="org.eclipse.ui.edit.text.lowerCase"
544-
disabledIcon="icons/full/dtool16/toLower.png"
545540
icon="icons/full/etool16/toLower.png">
546541
</image>
547542
</extension>
@@ -1294,7 +1289,6 @@
12941289
toolbarPath="Normal/Presentation"
12951290
id="org.eclipse.ui.edit.text.toggleShowSelectedElementOnly"
12961291
definitionId="org.eclipse.ui.edit.text.toggleShowSelectedElementOnly"
1297-
disabledIcon="$nl$/icons/full/dtool16/segment_edit.png"
12981292
icon="$nl$/icons/full/etool16/segment_edit.png"
12991293
helpContextId="org.eclipse.ui.only_show_selected_element_action_context"
13001294
label="%onlyShowSelectedElement.label"
@@ -1304,7 +1298,6 @@
13041298
<action
13051299
allowLabelUpdate="true"
13061300
definitionId="org.eclipse.ui.edit.text.toggleShowWhitespaceCharacters"
1307-
disabledIcon="$nl$/icons/full/dtool16/show_whitespace_chars.png"
13081301
helpContextId="org.eclipse.ui.show_whitespace_characters_action_context"
13091302
icon="$nl$/icons/full/etool16/show_whitespace_chars.png"
13101303
id="org.eclipse.ui.edit.text.toggleShowWhitespaceCharacters"
@@ -1317,7 +1310,6 @@
13171310
<action
13181311
allowLabelUpdate="true"
13191312
definitionId="org.eclipse.ui.edit.text.toggleBlockSelectionMode"
1320-
disabledIcon="$nl$/icons/full/dtool16/block_selection_mode.png"
13211313
helpContextId="org.eclipse.ui.block_selection_mode_action_context"
13221314
icon="$nl$/icons/full/etool16/block_selection_mode.png"
13231315
id="org.eclipse.ui.edit.text.toggleBlockSelectionMode"
@@ -1330,7 +1322,6 @@
13301322
<action
13311323
allowLabelUpdate="true"
13321324
definitionId="org.eclipse.ui.edit.text.toggleWordWrap"
1333-
disabledIcon="$nl$/icons/full/dtool16/wordwrap.png"
13341325
helpContextId="org.eclipse.ui.word_wrap_toggle_action_context"
13351326
icon="$nl$/icons/full/etool16/wordwrap.png"
13361327
id="org.eclipse.ui.edit.text.toggleWordWrap"

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/WorkbenchImages.java

Lines changed: 60 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.eclipse.core.runtime.Assert;
2121
import org.eclipse.jface.resource.ImageDescriptor;
2222
import org.eclipse.jface.resource.ImageRegistry;
23+
import org.eclipse.swt.SWT;
2324
import org.eclipse.swt.graphics.Image;
2425
import org.eclipse.ui.ISharedImages;
2526
import org.eclipse.ui.PlatformUI;
@@ -71,12 +72,8 @@
7172

7273
private static final String PATH_ETOOL = ICONS_PATH + "etool16/"; // Enabled toolbar icons.//$NON-NLS-1$
7374

74-
private static final String PATH_DTOOL = ICONS_PATH + "dtool16/"; // Disabled toolbar icons.//$NON-NLS-1$
75-
7675
private static final String PATH_ELOCALTOOL = ICONS_PATH + "elcl16/"; // Enabled local toolbar icons.//$NON-NLS-1$
7776

78-
private static final String PATH_DLOCALTOOL = ICONS_PATH + "dlcl16/"; // Disabled local toolbar icons.//$NON-NLS-1$
79-
8077
private static final String PATH_EVIEW = ICONS_PATH + "eview16/"; // View icons//$NON-NLS-1$
8178

8279
private static final String PATH_OVERLAY = ICONS_PATH + "ovr16/"; //$NON-NLS-1$
@@ -101,9 +98,17 @@
10198
* <code>false</code> if this is not a shared image
10299
*/
103100
private static final void declareImage(String key, String path, boolean shared) {
104-
ImageDescriptor desc = ImageDescriptor
105-
.createFromURLSupplier(true, () -> BundleUtility.find(PlatformUI.PLUGIN_ID, path));
101+
declareImage(key, null, path, shared);
102+
}
103+
104+
private static final void declareImage(String key, String disabledKey, String path, boolean shared) {
105+
ImageDescriptor desc = ImageDescriptor.createFromURLSupplier(true,
106+
() -> BundleUtility.find(PlatformUI.PLUGIN_ID, path));
106107
declareImage(key, desc, shared);
108+
if (disabledKey != null) {
109+
ImageDescriptor disabledImageDescriptor = ImageDescriptor.createWithFlags(desc, SWT.IMAGE_DISABLE);
110+
declareImage(disabledKey, disabledImageDescriptor, shared);
111+
}
107112
}
108113

109114
/**
@@ -117,91 +122,89 @@ private static final void declareImages() {
117122
declareImage(ISharedImages.IMG_DEC_FIELD_WARNING, PATH_OVERLAY + "warning_ovr.png", true); //$NON-NLS-1$
118123

119124
// Pinning
120-
declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_PIN_EDITOR, PATH_ETOOL + "pin_editor.png", false); //$NON-NLS-1$
121-
declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_PIN_EDITOR_DISABLED, PATH_DTOOL + "pin_editor.png", false); //$NON-NLS-1$
125+
declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_PIN_EDITOR,
126+
IWorkbenchGraphicConstants.IMG_ETOOL_PIN_EDITOR_DISABLED, PATH_ETOOL + "pin_editor.png", false); //$NON-NLS-1$
122127

123128
// other toolbar buttons
129+
declareImage(ISharedImages.IMG_ETOOL_SAVE_EDIT, ISharedImages.IMG_ETOOL_SAVE_EDIT_DISABLED,
130+
PATH_ETOOL + "save_edit.png", true); //$NON-NLS-1$
124131

125-
declareImage(ISharedImages.IMG_ETOOL_SAVE_EDIT, PATH_ETOOL + "save_edit.png", true); //$NON-NLS-1$
126-
declareImage(ISharedImages.IMG_ETOOL_SAVE_EDIT_DISABLED, PATH_DTOOL + "save_edit.png", true); //$NON-NLS-1$
127-
128-
declareImage(ISharedImages.IMG_ETOOL_SAVEAS_EDIT, PATH_ETOOL + "saveas_edit.png", true); //$NON-NLS-1$
129-
declareImage(ISharedImages.IMG_ETOOL_SAVEAS_EDIT_DISABLED, PATH_DTOOL + "saveas_edit.png", true); //$NON-NLS-1$
132+
declareImage(ISharedImages.IMG_ETOOL_SAVEAS_EDIT, ISharedImages.IMG_ETOOL_SAVEAS_EDIT_DISABLED,
133+
PATH_ETOOL + "saveas_edit.png", true); //$NON-NLS-1$
130134

131-
declareImage(ISharedImages.IMG_ETOOL_SAVEALL_EDIT, PATH_ETOOL + "saveall_edit.png", true); //$NON-NLS-1$
132-
declareImage(ISharedImages.IMG_ETOOL_SAVEALL_EDIT_DISABLED, PATH_DTOOL + "saveall_edit.png", true); //$NON-NLS-1$
135+
declareImage(ISharedImages.IMG_ETOOL_SAVEALL_EDIT, ISharedImages.IMG_ETOOL_SAVEALL_EDIT_DISABLED,
136+
PATH_ETOOL + "saveall_edit.png", true); //$NON-NLS-1$
133137

134-
declareImage(ISharedImages.IMG_TOOL_UNDO, PATH_ETOOL + "undo_edit.png", true); //$NON-NLS-1$
135-
declareImage(ISharedImages.IMG_TOOL_UNDO_DISABLED, PATH_DTOOL + "undo_edit.png", true); //$NON-NLS-1$
138+
declareImage(ISharedImages.IMG_TOOL_UNDO, ISharedImages.IMG_TOOL_UNDO_DISABLED, PATH_ETOOL + "undo_edit.png", //$NON-NLS-1$
139+
true);
136140

137-
declareImage(ISharedImages.IMG_TOOL_REDO, PATH_ETOOL + "redo_edit.png", true); //$NON-NLS-1$
138-
declareImage(ISharedImages.IMG_TOOL_REDO_DISABLED, PATH_DTOOL + "redo_edit.png", true); //$NON-NLS-1$
141+
declareImage(ISharedImages.IMG_TOOL_REDO, ISharedImages.IMG_TOOL_REDO_DISABLED, PATH_ETOOL + "redo_edit.png", //$NON-NLS-1$
142+
true);
139143

140-
declareImage(ISharedImages.IMG_TOOL_CUT, PATH_ETOOL + "cut_edit.png", true); //$NON-NLS-1$
141-
declareImage(ISharedImages.IMG_TOOL_CUT_DISABLED, PATH_DTOOL + "cut_edit.png", true); //$NON-NLS-1$
144+
declareImage(ISharedImages.IMG_TOOL_CUT, ISharedImages.IMG_TOOL_CUT_DISABLED, PATH_ETOOL + "cut_edit.png", //$NON-NLS-1$
145+
true);
142146

143-
declareImage(ISharedImages.IMG_TOOL_COPY, PATH_ETOOL + "copy_edit.png", true); //$NON-NLS-1$
144-
declareImage(ISharedImages.IMG_TOOL_COPY_DISABLED, PATH_DTOOL + "copy_edit.png", true); //$NON-NLS-1$
147+
declareImage(ISharedImages.IMG_TOOL_COPY, ISharedImages.IMG_TOOL_COPY_DISABLED, PATH_ETOOL + "copy_edit.png", //$NON-NLS-1$
148+
true);
145149

146-
declareImage(ISharedImages.IMG_TOOL_PASTE, PATH_ETOOL + "paste_edit.png", true); //$NON-NLS-1$
147-
declareImage(ISharedImages.IMG_TOOL_PASTE_DISABLED, PATH_DTOOL + "paste_edit.png", true); //$NON-NLS-1$
150+
declareImage(ISharedImages.IMG_TOOL_PASTE, ISharedImages.IMG_TOOL_PASTE_DISABLED, PATH_ETOOL + "paste_edit.png", //$NON-NLS-1$
151+
true);
148152

149-
declareImage(ISharedImages.IMG_TOOL_DELETE, PATH_ETOOL + "delete_edit.png", true); //$NON-NLS-1$
150-
declareImage(ISharedImages.IMG_TOOL_DELETE_DISABLED, PATH_DTOOL + "delete_edit.png", true); //$NON-NLS-1$
153+
declareImage(ISharedImages.IMG_TOOL_DELETE, ISharedImages.IMG_TOOL_DELETE_DISABLED,
154+
PATH_ETOOL + "delete_edit.png", true); //$NON-NLS-1$
151155

152-
declareImage(ISharedImages.IMG_ETOOL_DELETE, PATH_ETOOL + "delete.png", true); //$NON-NLS-1$
153-
declareImage(ISharedImages.IMG_ETOOL_DELETE_DISABLED, PATH_DTOOL + "delete.png", true); //$NON-NLS-1$
156+
declareImage(ISharedImages.IMG_ETOOL_DELETE, ISharedImages.IMG_ETOOL_DELETE_DISABLED, PATH_ETOOL + "delete.png", //$NON-NLS-1$
157+
true);
154158

155-
declareImage(ISharedImages.IMG_ETOOL_CLEAR, PATH_ETOOL + "clear.png", true); //$NON-NLS-1$
156-
declareImage(ISharedImages.IMG_ETOOL_CLEAR_DISABLED, PATH_DTOOL + "clear.png", true); //$NON-NLS-1$
159+
declareImage(ISharedImages.IMG_ETOOL_CLEAR, ISharedImages.IMG_ETOOL_CLEAR_DISABLED, PATH_ETOOL + "clear.png", //$NON-NLS-1$
160+
true);
157161

158-
declareImage(ISharedImages.IMG_TOOL_NEW_WIZARD, PATH_ETOOL + "new_wiz.png", true); //$NON-NLS-1$
159-
declareImage(ISharedImages.IMG_TOOL_NEW_WIZARD_DISABLED, PATH_DTOOL + "new_wiz.png", true); //$NON-NLS-1$
162+
declareImage(ISharedImages.IMG_TOOL_NEW_WIZARD, ISharedImages.IMG_TOOL_NEW_WIZARD_DISABLED,
163+
PATH_ETOOL + "new_wiz.png", true); //$NON-NLS-1$
160164

161-
declareImage(ISharedImages.IMG_ETOOL_PRINT_EDIT, PATH_ETOOL + "print_edit.png", true); //$NON-NLS-1$
162-
declareImage(ISharedImages.IMG_ETOOL_PRINT_EDIT_DISABLED, PATH_DTOOL + "print_edit.png", true); //$NON-NLS-1$
165+
declareImage(ISharedImages.IMG_ETOOL_PRINT_EDIT, ISharedImages.IMG_ETOOL_PRINT_EDIT_DISABLED,
166+
PATH_ETOOL + "print_edit.png", true); //$NON-NLS-1$
163167

164168
declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_HELP_CONTENTS, PATH_ETOOL + "help_contents.png", true); //$NON-NLS-1$
165169
declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_HELP_SEARCH, PATH_ETOOL + "help_search.png", true); //$NON-NLS-1$
166170
declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_TIPS_AND_TRICKS, PATH_ETOOL + "tricks.png", true); //$NON-NLS-1$
167171

168-
declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_NEW_FASTVIEW, PATH_ETOOL + "new_fastview.png", true); //$NON-NLS-1$
169-
declareImage(IWorkbenchGraphicConstants.IMG_DTOOL_NEW_FASTVIEW, PATH_DTOOL + "new_fastview.png", true); //$NON-NLS-1$
172+
declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_NEW_FASTVIEW,
173+
IWorkbenchGraphicConstants.IMG_DTOOL_NEW_FASTVIEW, PATH_ETOOL + "new_fastview.png", true); //$NON-NLS-1$
170174

171175
declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_RESTORE_TRIMPART, PATH_ETOOL + "fastview_restore.png", true); //$NON-NLS-1$
172176
declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_EDITOR_TRIMPART, PATH_ETOOL + "editor_area.png", true); //$NON-NLS-1$
173177

174-
declareImage(ISharedImages.IMG_TOOL_FORWARD, PATH_ELOCALTOOL + "forward_nav.png", true); //$NON-NLS-1$
175-
declareImage(ISharedImages.IMG_TOOL_FORWARD_DISABLED, PATH_DLOCALTOOL + "forward_nav.png", true); //$NON-NLS-1$
178+
declareImage(ISharedImages.IMG_TOOL_FORWARD, ISharedImages.IMG_TOOL_FORWARD_DISABLED,
179+
PATH_ELOCALTOOL + "forward_nav.png", true); //$NON-NLS-1$
176180

177-
declareImage(ISharedImages.IMG_TOOL_BACK, PATH_ELOCALTOOL + "backward_nav.png", true); //$NON-NLS-1$
178-
declareImage(ISharedImages.IMG_TOOL_BACK_DISABLED, PATH_DLOCALTOOL + "backward_nav.png", true); //$NON-NLS-1$
181+
declareImage(ISharedImages.IMG_TOOL_BACK, ISharedImages.IMG_TOOL_BACK_DISABLED,
182+
PATH_ELOCALTOOL + "backward_nav.png", true); //$NON-NLS-1$
179183

180-
declareImage(ISharedImages.IMG_TOOL_UP, PATH_ELOCALTOOL + "up_nav.png", true); //$NON-NLS-1$
181-
declareImage(ISharedImages.IMG_TOOL_UP_DISABLED, PATH_DLOCALTOOL + "up_nav.png", true); //$NON-NLS-1$
184+
declareImage(ISharedImages.IMG_TOOL_UP, ISharedImages.IMG_TOOL_UP_DISABLED, PATH_ELOCALTOOL + "up_nav.png", true); //$NON-NLS-1$
182185

183-
declareImage(ISharedImages.IMG_ELCL_SYNCED, PATH_ELOCALTOOL + "synced.png", true); //$NON-NLS-1$
184-
declareImage(ISharedImages.IMG_ELCL_SYNCED_DISABLED, PATH_DLOCALTOOL + "synced.png", true); //$NON-NLS-1$
186+
declareImage(ISharedImages.IMG_ELCL_SYNCED, ISharedImages.IMG_ELCL_SYNCED_DISABLED,
187+
PATH_ELOCALTOOL + "synced.png", true); //$NON-NLS-1$
185188

186-
declareImage(ISharedImages.IMG_ELCL_COLLAPSEALL, PATH_ELOCALTOOL + "collapseall.png", true); //$NON-NLS-1$
187-
declareImage(ISharedImages.IMG_ELCL_COLLAPSEALL_DISABLED, PATH_DLOCALTOOL + "collapseall.png", true); //$NON-NLS-1$
189+
declareImage(ISharedImages.IMG_ELCL_COLLAPSEALL, ISharedImages.IMG_ELCL_COLLAPSEALL_DISABLED,
190+
PATH_ELOCALTOOL + "collapseall.png", true); //$NON-NLS-1$
188191

189-
declareImage(ISharedImages.IMG_ELCL_REMOVE, PATH_ELOCALTOOL + "remove.png", true); //$NON-NLS-1$
190-
declareImage(ISharedImages.IMG_ELCL_REMOVE_DISABLED, PATH_DLOCALTOOL + "remove.png", true); //$NON-NLS-1$
192+
declareImage(ISharedImages.IMG_ELCL_REMOVE, ISharedImages.IMG_ELCL_REMOVE_DISABLED,
193+
PATH_ELOCALTOOL + "remove.png", true); //$NON-NLS-1$
191194

192-
declareImage(ISharedImages.IMG_ELCL_REMOVEALL, PATH_ELOCALTOOL + "removeall.png", true); //$NON-NLS-1$
193-
declareImage(ISharedImages.IMG_ELCL_REMOVEALL_DISABLED, PATH_DLOCALTOOL + "removeall.png", true); //$NON-NLS-1$
195+
declareImage(ISharedImages.IMG_ELCL_REMOVEALL, ISharedImages.IMG_ELCL_REMOVEALL_DISABLED,
196+
PATH_ELOCALTOOL + "removeall.png", true); //$NON-NLS-1$
194197

195-
declareImage(ISharedImages.IMG_ELCL_COLLAPSEALL, PATH_ELOCALTOOL + "collapseall.png", true); //$NON-NLS-1$
196-
declareImage(ISharedImages.IMG_ELCL_COLLAPSEALL_DISABLED, PATH_DLOCALTOOL + "collapseall.png", true); //$NON-NLS-1$
198+
declareImage(ISharedImages.IMG_ELCL_COLLAPSEALL, ISharedImages.IMG_ELCL_COLLAPSEALL_DISABLED,
199+
PATH_ELOCALTOOL + "collapseall.png", true); //$NON-NLS-1$
197200

198-
declareImage(ISharedImages.IMG_ELCL_STOP, PATH_ELOCALTOOL + "stop.png", true); //$NON-NLS-1$
199-
declareImage(ISharedImages.IMG_ELCL_STOP_DISABLED, PATH_DLOCALTOOL + "stop.png", true); //$NON-NLS-1$
201+
declareImage(ISharedImages.IMG_ELCL_STOP, ISharedImages.IMG_ELCL_STOP_DISABLED, PATH_ELOCALTOOL + "stop.png", //$NON-NLS-1$
202+
true);
200203

201204
declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_NEW_PAGE, PATH_EVIEW + "new_persp.png", false); //$NON-NLS-1$
202205

203-
declareImage(ISharedImages.IMG_ETOOL_HOME_NAV, PATH_ELOCALTOOL + "home_nav.png", true); //$NON-NLS-1$
204-
declareImage(ISharedImages.IMG_ETOOL_HOME_NAV_DISABLED, PATH_DLOCALTOOL + "home_nav.png", true); //$NON-NLS-1$
206+
declareImage(ISharedImages.IMG_ETOOL_HOME_NAV, ISharedImages.IMG_ETOOL_HOME_NAV_DISABLED,
207+
PATH_ELOCALTOOL + "home_nav.png", true); //$NON-NLS-1$
205208

206209
declareImage(ISharedImages.IMG_ETOOL_DEF_PERSPECTIVE, PATH_EVIEW + "default_persp.png", true); //$NON-NLS-1$
207210

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/progress/ProgressInfoItem.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -153,20 +153,21 @@ interface IndexListener {
153153
private boolean isThemed;
154154

155155
static {
156-
JFaceResources.getImageRegistry().put(STOP_IMAGE_KEY,
157-
WorkbenchImages.getWorkbenchImageDescriptor("elcl16/progress_stop.png"));//$NON-NLS-1$
158-
159-
JFaceResources.getImageRegistry().put(DISABLED_STOP_IMAGE_KEY,
160-
WorkbenchImages.getWorkbenchImageDescriptor("dlcl16/progress_stop.png"));//$NON-NLS-1$
156+
ImageDescriptor processStopDescriptor = WorkbenchImages.getWorkbenchImageDescriptor("elcl16/progress_stop.png"); //$NON-NLS-1$
157+
JFaceResources.getImageRegistry().put(STOP_IMAGE_KEY, processStopDescriptor);
158+
ImageDescriptor disabledProcessStopDescriptor = ImageDescriptor.createWithFlags(processStopDescriptor,
159+
SWT.IMAGE_DISABLE);
160+
JFaceResources.getImageRegistry().put(DISABLED_STOP_IMAGE_KEY, disabledProcessStopDescriptor);
161161

162162
JFaceResources.getImageRegistry().put(DEFAULT_JOB_KEY,
163163
WorkbenchImages.getWorkbenchImageDescriptor("progress/progress_task.png")); //$NON-NLS-1$
164164

165-
JFaceResources.getImageRegistry().put(CLEAR_FINISHED_JOB_KEY,
166-
WorkbenchImages.getWorkbenchImageDescriptor("elcl16/progress_rem.png")); //$NON-NLS-1$
167-
168-
JFaceResources.getImageRegistry().put(DISABLED_CLEAR_FINISHED_JOB_KEY,
169-
WorkbenchImages.getWorkbenchImageDescriptor("dlcl16/progress_rem.png")); //$NON-NLS-1$
165+
ImageDescriptor processRemoveDescriptor = WorkbenchImages
166+
.getWorkbenchImageDescriptor("elcl16/progress_rem.png"); //$NON-NLS-1$
167+
JFaceResources.getImageRegistry().put(CLEAR_FINISHED_JOB_KEY, processRemoveDescriptor);
168+
ImageDescriptor disabledProcessRemoveDescriptor = ImageDescriptor.createWithFlags(processRemoveDescriptor,
169+
SWT.IMAGE_DISABLE);
170+
JFaceResources.getImageRegistry().put(DISABLED_CLEAR_FINISHED_JOB_KEY, disabledProcessRemoveDescriptor);
170171

171172
// Mac has different Gamma value
172173
int shift = Util.isMac() ? -25 : -10;

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/progress/ProgressView.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,6 @@ public void run() {
248248
if (id != null) {
249249
clearAllAction.setImageDescriptor(id);
250250
}
251-
id = WorkbenchImages.getWorkbenchImageDescriptor("/dlcl16/progress_remall.png"); //$NON-NLS-1$
252-
if (id != null) {
253-
clearAllAction.setDisabledImageDescriptor(id);
254-
}
255251
}
256252

257253
/**

0 commit comments

Comments
 (0)