Skip to content

Commit ed0ded8

Browse files
committed
ImageBasedFrame wraps when parent resizes
This commit improves the logic for when to wrap an ImageBasedFrame by moving away the responsibility of handling ZoomChanged event from SWT but rather reacting on when the parent is resizing itself.
1 parent 6ed2b3b commit ed0ded8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bundles/org.eclipse.e4.ui.widgets/src/org/eclipse/e4/ui/widgets/ImageBasedFrame.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,13 @@ public ImageBasedFrame(Composite parent, Control toWrap, boolean vertical,
6666
ImageBasedFrame frame = (ImageBasedFrame) event.widget;
6767
frame.setCursor(null);
6868
});
69-
toWrap.addListener(SWT.ZoomChanged, event -> {
69+
70+
parent.addListener(SWT.Resize, event -> {
71+
if (isDisposed())
72+
return;
7073
toWrap.pack(true);
7174
setFramedControlLocation();
75+
parent.layout();
7276
});
7377

7478
addMouseMoveListener(e -> {

0 commit comments

Comments
 (0)