From bd9012c856527b3c4bd0cb99eecd89ba4b69a6d2 Mon Sep 17 00:00:00 2001 From: Shahzaib Ibrahim Date: Tue, 26 Aug 2025 16:24:07 +0200 Subject: [PATCH] Scale Tree.SORT_WIDTH by zoom level instead of using fixed pixels The Tree.SORT_WIDTH constant specifies the extra width added to a column when a sort column is set (`setSortColumn`). This reserves space for the sort indicator. Previously, it was defined as a fixed pixel. --- .../Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java index b7fae937436..77a738595bc 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java @@ -411,7 +411,7 @@ public void pack () { if (image != null || parent.sortColumn == this) { hasHeaderImage = true; if (parent.sortColumn == this && parent.sortDirection != SWT.NONE) { - headerWidth += Table.SORT_WIDTH; + headerWidth += Win32DPIUtils.pointToPixel(Table.SORT_WIDTH, getZoom()); } else if (image != null) { Rectangle bounds = Win32DPIUtils.pointToPixel(image.getBounds(), getZoom()); headerWidth += bounds.width;