Skip to content

Commit 9f51175

Browse files
committed
[gtk] Remove obsolete GtkDPIUtil
GtkDPIUtil only contains a single method, which is equivalent to an existing method in DPIUtil with just an additional predefined argument. This change replaces the calls and removes the GtkDPIUtil.
1 parent b044bef commit 9f51175

2 files changed

Lines changed: 3 additions & 32 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ public Image(Device device, Rectangle bounds) {
440440
* @see #dispose()
441441
*/
442442
public Image(Device device, ImageData data) {
443-
this(device, GtkDPIUtil.pointToPixel(device, data), DPIUtil.getDeviceZoom());
443+
this(device, DPIUtil.autoScaleImageData(device, data, 100), DPIUtil.getDeviceZoom());
444444
}
445445

446446
private Image(Device device, ImageData data, int zoom) {
@@ -489,8 +489,8 @@ public Image(Device device, ImageData source, ImageData mask) {
489489
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
490490
}
491491
currentDeviceZoom = DPIUtil.getDeviceZoom();
492-
source = GtkDPIUtil.pointToPixel (device, source);
493-
mask = GtkDPIUtil.pointToPixel (device, mask);
492+
source = DPIUtil.autoScaleImageData(device, source, 100);
493+
mask = DPIUtil.autoScaleImageData(device, mask, 100);
494494
mask = ImageData.convertMask (mask);
495495
ImageData image = new ImageData(source.width, source.height, source.depth, source.palette, source.scanlinePad, source.data);
496496
image.maskPad = mask.scanlinePad;

bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GtkDPIUtil.java

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)