Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-07-23 16:30:53 +0000
committerPaul Pazderski2019-07-25 09:15:33 +0000
commitfc1d1922254505a0762ea836f57681a322aadcbc (patch)
tree9e597ddd7838dff9735a6a2a15ae7718466c07de
parentdddf4f29b8a5d889d41e8e89d6aeadb0fdf9d6f3 (diff)
downloadeclipse.platform.text-fc1d1922254505a0762ea836f57681a322aadcbc.tar.gz
eclipse.platform.text-fc1d1922254505a0762ea836f57681a322aadcbc.tar.xz
eclipse.platform.text-fc1d1922254505a0762ea836f57681a322aadcbc.zip
Bug 17805 - [painting] Print margin drawn on top of textY20190725-0900
MarginPainter is not respecting margin of the text widget. Change-Id: Ia3782e249f66b1d0880f6e68868451f3d5402e10 Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/MarginPainter.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/MarginPainter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/MarginPainter.java
index 008a9bcf19e..b4430051a92 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/MarginPainter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/MarginPainter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -121,7 +121,7 @@ public class MarginPainter implements IPainter, PaintListener {
double pixels= gc.getFontMetrics().getAverageCharacterWidth();
gc.dispose();
- fCachedWidgetX= (int) (pixels * fMarginWidth + 0.5);
+ fCachedWidgetX= (int) (pixels * fMarginWidth + fTextWidget.getLeftMargin() + 0.5);
}
@Override

Back to the top