Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt;bundle-version="[3.128.0,4.0.0)"
Bundle-Name: %fragmentName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.swt.win32.win32.x86_64; singleton:=true
Bundle-Version: 3.133.0.qualifier
Bundle-Version: 3.132.0.qualifier
Bundle-ManifestVersion: 2
Bundle-Localization: fragment
Export-Package:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3527,6 +3527,13 @@ NSTouch findTouchWithId(NSArray touches, NSObject identity) {
return null;
}

/**
* @since 3.132
*/
public boolean setAutoscaleDisabled(boolean autoscaleDisabled) {
return false;
}

void setBackground () {
if (!drawsBackground()) return;
Control control = findBackgroundControl ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ public abstract class Control extends Widget implements Drawable {

private static final String DATA_SHELL_ZOOM = "SHELL_ZOOM";

private static final String DATA_AUTOSCALE_DISABLED = "AUTOSCALE_DISABLED";

private static final String PROPOGATE_AUTOSCALE_DISABLED = "PROPOGATE_AUTOSCALE_DISABLED";
/**
* Prevents uninitialized instances from being created outside the package.
Expand Down Expand Up @@ -1282,19 +1280,6 @@ public Object getData(String key) {
return super.getData(key);
}

@Override
public void setData(String key, Object value) {
super.setData(key, value);
if (DATA_AUTOSCALE_DISABLED.equals(key)) {
autoScaleDisabled = Boolean.parseBoolean(value.toString());
if (autoScaleDisabled) {
this.nativeZoom = 100;
} else {
this.nativeZoom = getShellZoom();
}
}
}

/**
* Returns <code>true</code> if the receiver is detecting
* drag gestures, and <code>false</code> otherwise.
Expand Down Expand Up @@ -1873,6 +1858,11 @@ boolean isActive () {
return shell.getEnabled ();
}

@Override
public boolean isAutoScalable() {
return !autoScaleDisabled;
}

/**
* Returns <code>true</code> if the receiver is enabled and all
* ancestors up to and including the receiver's nearest ancestor
Expand Down Expand Up @@ -3352,6 +3342,19 @@ private void fitInParentBounds(Rectangle boundsInPixels, int zoom) {
}
}

/**
* @since 3.132
*/
public boolean setAutoscaleDisabled(boolean autoscaleDisabled) {
this.autoScaleDisabled = autoscaleDisabled;
if (autoScaleDisabled) {
this.nativeZoom = 100;
} else {
this.nativeZoom = getShellZoom();
}
return true;
}

void setBoundsInPixels (Rectangle rect) {
setBoundsInPixels (rect.x, rect.y, rect.width, rect.height);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,11 @@ public ToolBar getToolBar() {
return null;
}

@Override
int getNativeZoom() {
return DPIUtil.mapDPIToZoom(OS.GetDpiForWindow(handle));
}

@Override
Composite findDeferredControl () {
return layoutCount > 0 ? this : null;
Expand Down
Loading