Skip to content

Commit a9598b8

Browse files
ShahzaibIbrahimakoch-yatta
authored andcommitted
Use fix value for Inset when tree item has both checkbox and image
The inset value defines a gap between text and image on a tree item, but due to multiple zoom level it was set to convert that value as per zoom level but with the combination of image and checkbox, it moves the image too much on the left resulting in cutoff checkbox. It is better to use fix value for INSET just for this case
1 parent 5f3c2a5 commit a9598b8

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/TreeItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText,
440440
if (getImage && !fullImage) {
441441
if (OS.SendMessage (hwnd, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0) != 0) {
442442
Point size = parent.getImageSize ();
443-
rect.left -= size.x + DPIUtil.pointToPixel(Tree.INSET, getZoom());
443+
rect.left -= size.x + Tree.INSET;
444444
if (!getText) rect.right = rect.left + size.x;
445445
} else {
446446
if (!getText) rect.right = rect.left;

0 commit comments

Comments
 (0)