Bug 518676 - [Win32] Tree header-column separator not aligned to Tree
column separator
Change-Id: Icdf4c02bd2433b3984441c5a4eaa37d235d6047c
Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
index c6a108e..dba3101 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
@@ -8038,7 +8038,7 @@
if (linesVisible) {
pen = OS.CreatePen (OS.PS_SOLID, getGridLineWidthInPixels(), OS.GetSysColor(OS.COLOR_3DFACE));
oldPen = OS.SelectObject (nmcd.hdc, pen);
- OS.Polyline(nmcd.hdc, new int[] {rects[i].right, rects[i].top, rects[i].right, rects[i].bottom}, 2);
+ OS.Polyline(nmcd.hdc, new int[] {rects[i].right-1, rects[i].top, rects[i].right-1, rects[i].bottom}, 2);
OS.SelectObject (nmcd.hdc, oldPen);
OS.DeleteObject (pen);
}
@@ -8082,7 +8082,6 @@
if (lastColumnRight < nmcd.right) {
// draw background of the 'no column' area
RECT rect = new RECT();
- lastColumnRight += linesVisible ? 1 : 0;
OS.SetRect(rect, lastColumnRight, nmcd.top, nmcd.right, nmcd.bottom);
long /*int*/ brush = OS.CreateSolidBrush(getHeaderBackgroundPixel());
OS.FillRect(nmcd.hdc, rect, brush);