Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorazerr2018-05-03 09:41:19 -0400
committerMickael Istria2018-05-03 09:46:04 -0400
commitf9ef44ee8069742d002309b19fbd44ea60e8620d (patch)
tree012075b07e14b32c933226bf4cb7d34ea5984ca2 /org.eclipse.jface.text/src
parentdb8a856dcb8e363ce2ebe4c068189743d90c2533 (diff)
downloadeclipse.platform.text-f9ef44ee8069742d002309b19fbd44ea60e8620d.tar.gz
eclipse.platform.text-f9ef44ee8069742d002309b19fbd44ea60e8620d.tar.xz
eclipse.platform.text-f9ef44ee8069742d002309b19fbd44ea60e8620d.zip
Bug 534318 - [code mining] Redraw of character has wrong y location for
line header annotation Change-Id: Ife2631df1fc90d98e5c03e210902940e4c5e1e72 Signed-off-by: azerr <angelo.zerr@gmail.com>
Diffstat (limited to 'org.eclipse.jface.text/src')
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationDrawingStrategy.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationDrawingStrategy.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationDrawingStrategy.java
index 2ffcc52cc..fc81f873f 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationDrawingStrategy.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationDrawingStrategy.java
@@ -93,15 +93,15 @@ class InlinedAnnotationDrawingStrategy implements IDrawingStrategy {
int x= bounds.x;
int y= bounds.y;
+ int height= annotation.getHeight();
// Colorize line spacing area with the background of StyledText to avoid having highlighted line color
gc.setBackground(textWidget.getBackground());
Rectangle client= textWidget.getClientArea();
- gc.fillRectangle(0, y, client.width, annotation.getHeight());
+ gc.fillRectangle(0, y, client.width, height);
// Draw the line header annotation
annotation.setLocation(x, y);
annotation.draw(gc, textWidget, offset, length, color, x, y);
- int height= annotation.getHeight();
if (height != 0) {
// The inline annotation replaces one character by taking a place width
// GlyphMetrics
@@ -127,7 +127,7 @@ class InlinedAnnotationDrawingStrategy implements IDrawingStrategy {
// FIXME: remove this code when we need not redraw the character (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=531769)
// START TO REMOVE
int charX= x + bounds.width - charWidth;
- int charY= y + bounds.height - height;
+ int charY= y + bounds.height - textWidget.getLineHeight();
if (style != null) {
if (style.background != null) {
gc.setBackground(style.background);

Back to the top