Skip to content

Commit c9910b8

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 1b48004 commit c9910b8

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
@@ -536,7 +536,8 @@ private static void handleDPIChange(Widget widget, int newZoom, float scalingFac
536536
if (item.height != 0 || item.width != 0) {
537537
int newWidth = Math.round(item.width * scalingFactor);
538538
int newHeight = Math.round(item.height * scalingFactor);
539-
item.setBoundsInPixels(item.x, item.y, newWidth, newHeight, false, true);
539+
item.setBoundsInPixels(item.x, item.y, newWidth, newHeight, true, true);
540+
item.parent.layoutItems(0, true);
540541
}
541542
}
542543
}

0 commit comments

Comments
 (0)