diff options
author | Mickael Istria | 2018-05-03 14:08:42 +0000 |
---|---|---|
committer | Mickael Istria | 2018-05-03 14:08:48 +0000 |
commit | e969129d9f4bb0e4c82f9e870887909572ccc5ab (patch) | |
tree | 7e7883578e213ea8e646f9867f9d56deb1b538dc /org.eclipse.jface.text | |
parent | 4ed3b6f29149d8c45e8c51b45c35088f3032cdf9 (diff) | |
download | eclipse.platform.text-e969129d9f4bb0e4c82f9e870887909572ccc5ab.tar.gz eclipse.platform.text-e969129d9f4bb0e4c82f9e870887909572ccc5ab.tar.xz eclipse.platform.text-e969129d9f4bb0e4c82f9e870887909572ccc5ab.zip |
Revert "Bug 534318 - [code mining] Redraw of character has wrong y location for line header annotation"
This reverts commit f9ef44ee8069742d002309b19fbd44ea60e8620d.
Change-Id: I9e81cbdb2f6b6e6219401b71ef7349103e9fafab
Diffstat (limited to 'org.eclipse.jface.text')
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationDrawingStrategy.java | 6 |
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 fc81f873fcc..2ffcc52cc79 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, height); + gc.fillRectangle(0, y, client.width, annotation.getHeight()); // 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 - textWidget.getLineHeight(); + int charY= y + bounds.height - height; if (style != null) { if (style.background != null) { gc.setBackground(style.background); |