Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2011-05-10 09:45:09 +0000
committerMarkus Keller2011-05-10 09:45:09 +0000
commitb0756f17f601b8a15aeb9ce53e121e754398c8f8 (patch)
tree07416fea76ec07ee32f64abc9f0efab695fb44a1 /org.eclipse.ui.editors
parent48ae0f097257ab4053d67b45e065be6340625f53 (diff)
downloadeclipse.platform.text-b0756f17f601b8a15aeb9ce53e121e754398c8f8.tar.gz
eclipse.platform.text-b0756f17f601b8a15aeb9ce53e121e754398c8f8.tar.xz
eclipse.platform.text-b0756f17f601b8a15aeb9ce53e121e754398c8f8.zip
Bug 345180: [preferences] Black background for icons in Annotations Preference Pagev20110510-0800
Diffstat (limited to 'org.eclipse.ui.editors')
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/AnnotationsConfigurationBlock.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/AnnotationsConfigurationBlock.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/AnnotationsConfigurationBlock.java
index 1b8ac895629..bb6c39b922d 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/AnnotationsConfigurationBlock.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/AnnotationsConfigurationBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -608,6 +608,11 @@ class AnnotationsConfigurationBlock implements IPreferenceConfigurationBlock {
if (data.height > SIZE || data.width > SIZE) {
// scale down to icon size
copy= new Image(Display.getCurrent(), data.scaledTo(SIZE, SIZE));
+
+ } else if (data.height == SIZE && data.width == SIZE) {
+ // nothing to scale, simply copy
+ copy= new Image(image.getDevice(), image, SWT.IMAGE_COPY);
+
} else {
// don't scale up, but rather copy into the middle and mark everything else transparent
ImageData mask= data.getTransparencyMask();

Back to the top