Skip to content

Commit e229551

Browse files
rolfthiloveeclipse
authored andcommitted
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 <[email protected]> Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/185829 Tested-by: Andrey Loskutov <[email protected]> Reviewed-by: Andrey Loskutov <[email protected]>
1 parent ca67876 commit e229551

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,7 @@ private void drawCloseLines(GC gc, int x, int y, int lineLength, boolean hot) {
899899
gc.setLineWidth(gc.getLineWidth() + 2);
900900
gc.setForeground(getFillColor());
901901
}
902+
gc.setLineCap(SWT.CAP_ROUND);
902903
gc.drawLine(x, y, x + lineLength, y + lineLength);
903904
gc.drawLine(x, y + lineLength, x + lineLength, y);
904905
}

0 commit comments

Comments
 (0)