mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-15 07:39:00 -04:00
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:
parent
7f46c6d7bd
commit
804d349b2e
@ -272,7 +272,7 @@ public class ControlData {
|
|||||||
keyValueMap.put("screen_width", "DUMMY_DATA" );
|
keyValueMap.put("screen_width", "DUMMY_DATA" );
|
||||||
keyValueMap.put("screen_height", "DUMMY_DATA");
|
keyValueMap.put("screen_height", "DUMMY_DATA");
|
||||||
keyValueMap.put("margin", Integer.toString((int) Tools.dpToPx(2)));
|
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);
|
conversionMap = new WeakReference<>(keyValueMap);
|
||||||
}
|
}
|
||||||
@ -295,6 +295,7 @@ public class ControlData {
|
|||||||
valueMap.put("height", Float.toString(getHeight()));
|
valueMap.put("height", Float.toString(getHeight()));
|
||||||
valueMap.put("screen_width",Integer.toString(CallbackBridge.physicalWidth));
|
valueMap.put("screen_width",Integer.toString(CallbackBridge.physicalWidth));
|
||||||
valueMap.put("screen_height",Integer.toString(CallbackBridge.physicalHeight));
|
valueMap.put("screen_height",Integer.toString(CallbackBridge.physicalHeight));
|
||||||
|
valueMap.put("preferred_scale", Float.toString(LauncherPreferences.PREF_BUTTONSIZE));
|
||||||
|
|
||||||
return valueMap;
|
return valueMap;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user