Skip to content

Commit 78d499e

Browse files
ShahzaibIbrahimakoch-yatta
authored andcommitted
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.
1 parent d6709a4 commit 78d499e

File tree

1 file changed

+1
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets

1 file changed

+1
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ public void pack () {
411411
if (image != null || parent.sortColumn == this) {
412412
hasHeaderImage = true;
413413
if (parent.sortColumn == this && parent.sortDirection != SWT.NONE) {
414-
headerWidth += Table.SORT_WIDTH;
414+
headerWidth += Win32DPIUtils.pointToPixel(Table.SORT_WIDTH, getZoom());
415415
} else if (image != null) {
416416
Rectangle bounds = Win32DPIUtils.pointToPixel(image.getBounds(), getZoom());
417417
headerWidth += bounds.width;

0 commit comments

Comments
 (0)