Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRolf Theunissen2021-09-25 10:58:03 +0000
committerAndrey Loskutov2021-09-26 07:43:41 +0000
commite229551e8c42af39578a43961869249936d9fce9 (patch)
tree692df3a7effb97d9e68f73acf8dda632caced43d
parentca678760dc2d0d528e780bf92d7c1acd5457daf5 (diff)
downloadeclipse.platform.swt-e229551e8c42af39578a43961869249936d9fce9.tar.gz
eclipse.platform.swt-e229551e8c42af39578a43961869249936d9fce9.tar.xz
eclipse.platform.swt-e229551e8c42af39578a43961869249936d9fce9.zip
Bug 575398 - CTabFolderRenderer: fix drawing the cross on Win32
Drawing using default lines causes the red cross close button lopsided on Win32 non-HiDPI. When round line caps are used, the cross is drawn correctly. Change-Id: I87599fa2e893a7bd1f6205e4d8936fdf978ef31d Signed-off-by: Rolf Theunissen <rolf.theunissen@gmail.com> Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/185829 Tested-by: Andrey Loskutov <loskutov@gmx.de> Reviewed-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java
index 63b4641574..2559d10b37 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java
@@ -899,6 +899,7 @@ public class CTabFolderRenderer {
gc.setLineWidth(gc.getLineWidth() + 2);
gc.setForeground(getFillColor());
}
+ gc.setLineCap(SWT.CAP_ROUND);
gc.drawLine(x, y, x + lineLength, y + lineLength);
gc.drawLine(x, y + lineLength, x + lineLength, y);
}

Back to the top