Skip to content

Commit 83e05b9

Browse files
Expand Bar is not scaled during DPI change
When moving from one zoom level monitor to another zoom level (no matter what %), The images, expanded items and texts are not drawn at correct coordinates.
1 parent 99f374d commit 83e05b9

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,8 @@ private static void handleDPIChange(Widget widget, int newZoom, float scalingFac
533533
if (item.height != 0 || item.width != 0) {
534534
int newWidth = Math.round(item.width * scalingFactor);
535535
int newHeight = Math.round(item.height * scalingFactor);
536-
item.setBoundsInPixels(item.x, item.y, newWidth, newHeight, false, true);
536+
item.setBoundsInPixels(item.x, item.y, newWidth, newHeight, true, true);
537+
item.parent.layoutItems(0, true);
537538
}
538539
}
539540
}

0 commit comments

Comments
 (0)