You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Always set disabled icons in AbstractContributionItem
AbstractionContributionItems only set a disabled icon on the ToolItem in
case such a disabled icon is specified via an explicit URI to that icon.
If no such URI is specified, the ToolItem creates a disabled icon on the
fly. Since the ToolItem creates a new image every time the enablement
state of the ToolItem changes, this leads to unnecessary repeated
creation of images.
In contrast, ActionContributionItems always set the disabled icon for
their ToolItem, even if no disabled image descriptor is specified for
them, to avoid that the ToolItem repeatedly created that icon.
This change align the AbstractContributionItem handling for disabled
icons with the one of ActionContributionItems: in case no URI to a
disabled icon is specified, the SWT disablement mechanism is used to
create a disabled version and to explicitly set it at the ToolItem. This
avoids unnecessary repeated creation of the disabled version of an icon
for those items.
Copy file name to clipboardExpand all lines: bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/AbstractContributionItem.java
0 commit comments