Skip to content

Commit 91058da

Browse files
ShahzaibIbrahimHeikoKlare
authored andcommitted
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 df66a8b commit 91058da

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
@@ -539,7 +539,8 @@ private static void handleDPIChange(Widget widget, int newZoom, float scalingFac
539539
if (item.height != 0 || item.width != 0) {
540540
int newWidth = Math.round(item.width * scalingFactor);
541541
int newHeight = Math.round(item.height * scalingFactor);
542-
item.setBoundsInPixels(item.x, item.y, newWidth, newHeight, false, true);
542+
item.setBoundsInPixels(item.x, item.y, newWidth, newHeight, true, true);
543+
item.parent.layoutItems(0, true);
543544
}
544545
}
545546
}

0 commit comments

Comments
 (0)