Skip to content

Commit d27e04e

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 a26b66a commit d27e04e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,7 @@ private static void handleDPIChange(Widget widget, int newZoom, float scalingFac
878878
for (ExpandItem item : expandBar.getItems()) {
879879
DPIZoomChangeRegistry.applyChange(item, newZoom, scalingFactor);
880880
}
881+
expandBar.layoutItems(0, true);
881882
expandBar.redraw();
882883
}
883884
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ 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);
543543
}
544544
}
545545
}

0 commit comments

Comments
 (0)