Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Becker2020-05-20 08:42:13 +0000
committerMatthias Becker2020-05-20 08:42:13 +0000
commita05a487e16b28b1cbb7ede1b16f7790fd6ed482b (patch)
tree49fc8c5608f29812f8070a9859a3fbcaa303b58e
parentcbe9fed0f88f2890c7d8f1130daa9e0a7378d882 (diff)
downloadeclipse.platform.debug-a05a487e16b28b1cbb7ede1b16f7790fd6ed482b.tar.gz
eclipse.platform.debug-a05a487e16b28b1cbb7ede1b16f7790fd6ed482b.tar.xz
eclipse.platform.debug-a05a487e16b28b1cbb7ede1b16f7790fd6ed482b.zip
- There is an underlying assumption while creating breadcrumb arrows. The image creation logic assumes the new image created is always created with transparent color. Currently only the opaque areas are set with alpha 255, which is opaque. But the areas where transparency should be set is not handled at all. This patch sets transparent area with alpha 0, which is transparent. This change is based on https://git.eclipse.org/r/#/c/163181/ Change-Id: I371373a7d7e1825fb17032465ddbe4e31fb8c0db
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDropDown.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDropDown.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDropDown.java
index 08739bb78..3f75d9191 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDropDown.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDropDown.java
@@ -103,14 +103,24 @@ class BreadcrumbItemDropDown implements IBreadcrumbDropDownSite {
image.dispose();
int zoomedArrowSize = ARROW_SIZE * zoom / 100;
for (int y1 = 0; y1 < zoomedArrowSize; y1++) {
+ // set opaque pixels for top half of the breadcrumb arrow
for (int x1 = 0; x1 <= y1; x1++) {
imageData.setAlpha(fLTR ? x1 : zoomedArrowSize - x1 - 1, y1, 255);
}
+ // set transparent pixels for top half of the breadcrumbe arrow
+ for (int x1 = y1 + 1; x1 < zoomedArrowSize; x1++) {
+ imageData.setAlpha(fLTR ? x1 : zoomedArrowSize - x1 - 1, y1, 0);
+ }
}
for (int y2 = 0; y2 < zoomedArrowSize; y2++) {
+ // set opaque pixels for bottom half of the breadcrumb arrow
for (int x2 = 0; x2 <= y2; x2++) {
imageData.setAlpha(fLTR ? x2 : zoomedArrowSize - x2 - 1, zoomedArrowSize * 2 - y2 - 1, 255);
}
+ // set transparent pixels for bottom half of the breadcrumbe arrow
+ for (int x2 = y2 + 1; x2 < zoomedArrowSize; x2++) {
+ imageData.setAlpha(fLTR ? x2 : zoomedArrowSize - x2 - 1, zoomedArrowSize * 2 - y2 - 1, 0);
+ }
}
return imageData;
};

Back to the top