Skip to content

Commit 3ccbe91

Browse files
HeikoKlareakoch-yatta
authored andcommitted
[Win32] Fix default value for autoscale disablement propagation
Autoscale disablement at the level of individual controls was recently made public API. With that change, the previous activation of that feature via hidden data fields on the controls was wrapped into a proper object-oriented representation. Previously, when not having the data field for propagation of autoscale disablement to children set, it was assumed to be activated by default. With the recent change, the default was accidentally changed, so that propagation to children is deactivated by default. To preserve backward compatibility, this change restores the original behavior of propagating autoscale disablement to children in case the according data value is not set.
1 parent 9751497 commit 3ccbe91

File tree

1 file changed

+1
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets

1 file changed

+1
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,7 @@ public void setData(String key, Object value) {
13111311
@Deprecated(since = "2026-03", forRemoval = true)
13121312
private void updateAutoScalingModeFromData() {
13131313
Object propagateAutoscaleDisabled = getData(PROPOGATE_AUTOSCALE_DISABLED);
1314-
boolean propagateAutoscaling = propagateAutoscaleDisabled != null && Boolean.parseBoolean(propagateAutoscaleDisabled.toString());
1314+
boolean propagateAutoscaling = propagateAutoscaleDisabled == null || Boolean.parseBoolean(propagateAutoscaleDisabled.toString());
13151315
Object autoscaleDisabled = getData(DATA_AUTOSCALE_DISABLED);
13161316
boolean isAutoscaleDisabled = autoscaleDisabled != null && Boolean.parseBoolean(autoscaleDisabled.toString());
13171317
if (isAutoscaleDisabled) {

0 commit comments

Comments
 (0)