Skip to content

Commit fc9de49

Browse files
Incorrect Zoom Level Applied When Dragging
When dragging and dropping a file from the Package Explorer or a field/method from the Outline view, the dragged item appears at an incorrect zoom level. Thats because the zoom for DragSource was not updated on zoom change and we use that zoom in DragListener to update the size of the imageList.
1 parent 84f02de commit fc9de49

File tree

1 file changed

+1
-0
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd

1 file changed

+1
-0
lines changed

bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ public DragSource(Control control, int style) {
383383
};
384384
control.addListener(SWT.Dispose, controlListener);
385385
control.addListener(SWT.DragDetect, controlListener);
386+
control.addListener(SWT.ZoomChanged, e -> this.nativeZoom = e.detail);
386387

387388
this.addListener(SWT.Dispose, e -> DragSource.this.onDispose());
388389

0 commit comments

Comments
 (0)