Skip to content

Commit bcc58ad

Browse files
ptzieglerakurtakov
authored andcommitted
[GTK] Remove duplicate device-zoom initialization in Image
The device zoom is hard-coded to 100% when creating blank images. Setting it to the current device zoom in the constructor is both wrong and unnecessary, given that the value will be immediately overwritten.
1 parent ebcb6b9 commit bcc58ad

File tree

1 file changed

+0
-2
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics

1 file changed

+0
-2
lines changed

bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ public final class Image extends Resource implements Drawable {
215215
public Image(Device device, int width, int height) {
216216
super(device);
217217
Point size = new Point(width, height);
218-
currentDeviceZoom = DPIUtil.getDeviceZoom();
219218
init(size.x, size.y);
220219
init();
221220
}
@@ -410,7 +409,6 @@ public Image(Device device, Image srcImage, int flag) {
410409
public Image(Device device, Rectangle bounds) {
411410
super(device);
412411
if (bounds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
413-
currentDeviceZoom = DPIUtil.getDeviceZoom();
414412
init(bounds.width, bounds.height);
415413
init();
416414
}

0 commit comments

Comments
 (0)