Skip to content

Commit d1de5d9

Browse files
committed
Replace usage of pre-generated disabled icons in org.eclipse.compare
Use on-the-fly generated disabled icons instead and remove outdated constants for the disabled icon PNG paths.
1 parent 6dc53fa commit d1de5d9

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

team/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.eclipse.jface.resource.ImageDescriptor;
2727
import org.eclipse.jface.text.IDocument;
2828
import org.eclipse.jface.viewers.Viewer;
29+
import org.eclipse.swt.SWT;
2930
import org.eclipse.swt.graphics.Image;
3031
import org.eclipse.swt.widgets.Composite;
3132
import org.eclipse.ui.IReusableEditor;
@@ -60,11 +61,6 @@ public final class CompareUI {
6061
*/
6162
public static final String PREFERENCE_PAGE_ID= "org.eclipse.compare.internal.ComparePreferencePage"; //$NON-NLS-1$
6263

63-
/**
64-
* Image descriptor for the disabled icon of the 'Next' tool bar button.
65-
* @since 2.0
66-
*/
67-
public static final ImageDescriptor DESC_DTOOL_NEXT= CompareUIPlugin.getImageDescriptor(ICompareUIConstants.DTOOL_NEXT);
6864
/**
6965
* Image descriptor for the normal icon of the 'Next' tool bar button.
7066
* @since 2.0
@@ -75,12 +71,12 @@ public final class CompareUI {
7571
* @since 2.0
7672
*/
7773
public static final ImageDescriptor DESC_ETOOL_NEXT= CompareUIPlugin.getImageDescriptor(ICompareUIConstants.ETOOL_NEXT);
78-
7974
/**
80-
* Image descriptor for the disabled icon of the 'Previous' tool bar button.
75+
* Image descriptor for the disabled icon of the 'Next' tool bar button.
8176
* @since 2.0
8277
*/
83-
public static final ImageDescriptor DESC_DTOOL_PREV= CompareUIPlugin.getImageDescriptor(ICompareUIConstants.DTOOL_PREV);
78+
public static final ImageDescriptor DESC_DTOOL_NEXT= ImageDescriptor.createWithFlags(DESC_ETOOL_NEXT, SWT.IMAGE_DISABLE);
79+
8480
/**
8581
* Image descriptor for the normal icon of the 'Previous' tool bar button.
8682
* @since 2.0
@@ -91,6 +87,11 @@ public final class CompareUI {
9187
* @since 2.0
9288
*/
9389
public static final ImageDescriptor DESC_ETOOL_PREV= CompareUIPlugin.getImageDescriptor(ICompareUIConstants.ETOOL_PREV);
90+
/**
91+
* Image descriptor for the disabled icon of the 'Previous' tool bar button.
92+
* @since 2.0
93+
*/
94+
public static final ImageDescriptor DESC_DTOOL_PREV= ImageDescriptor.createWithFlags(DESC_ETOOL_PREV, SWT.IMAGE_DISABLE);
9495

9596
/**
9697
* Name of the title property of a compare viewer.

team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ICompareUIConstants.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@
1717
public interface ICompareUIConstants {
1818
public final String PREFIX = CompareUIPlugin.getPluginId() + "."; //$NON-NLS-1$
1919

20-
public static final String DTOOL_NEXT= "dlcl16/next_nav.png"; //$NON-NLS-1$
2120
public static final String ETOOL_NEXT = "elcl16/next_nav.svg"; //$NON-NLS-1$
2221
public static final String CTOOL_NEXT= ETOOL_NEXT;
2322

24-
public static final String DTOOL_PREV= "dlcl16/prev_nav.png"; //$NON-NLS-1$
2523
public static final String ETOOL_PREV = "elcl16/prev_nav.svg"; //$NON-NLS-1$
2624
public static final String CTOOL_PREV= ETOOL_PREV;
2725

0 commit comments

Comments
 (0)