Fix [control]: Always update the control scale in the builder

This fixes the controls being wrongly placed when quickly changing the scale
This commit is contained in:
Boulay Mathias 2022-10-31 19:44:43 +01:00
parent 7f46c6d7bd
commit 804d349b2e

View File

@ -272,7 +272,7 @@ public class ControlData {
keyValueMap.put("screen_width", "DUMMY_DATA" );
keyValueMap.put("screen_height", "DUMMY_DATA");
keyValueMap.put("margin", Integer.toString((int) Tools.dpToPx(2)));
keyValueMap.put("preferred_scale", Float.toString(LauncherPreferences.PREF_BUTTONSIZE));
keyValueMap.put("preferred_scale", "DUMMY_DATA");
conversionMap = new WeakReference<>(keyValueMap);
}
@ -295,6 +295,7 @@ public class ControlData {
valueMap.put("height", Float.toString(getHeight()));
valueMap.put("screen_width",Integer.toString(CallbackBridge.physicalWidth));
valueMap.put("screen_height",Integer.toString(CallbackBridge.physicalHeight));
valueMap.put("preferred_scale", Float.toString(LauncherPreferences.PREF_BUTTONSIZE));
return valueMap;
}