Move spring loaded scale calculation to DeviceProfile.

Fix: 229838395
Test: manual
Change-Id: I6dbbc850e88aaacceb1363e342404b06104f8c10
This commit is contained in:
Pat Manning committed 2022-04-25 18:58:09 +01:00
1 parent 3a16087bab
commit a2e1499a2f
3 files changed
+33 -21

No files matched your search

+2 -4
View File
@@ -237,10 +237,8 @@ public class DropTargetBar extends FrameLayout
rightButton.getMeasuredHeight());
} else if (dp.isPhone) {
// Buttons aligned to outer edges of scaled workspace.
float shrunkTop = dp.getWorkspaceSpringLoadShrunkTop();
float shrunkBottom = dp.getWorkspaceSpringLoadShrunkBottom();
float scale =
(shrunkBottom - shrunkTop) / launcher.getWorkspace().getNormalChildHeight();
float scale = dp.getWorkspaceSpringLoadScale();
int workspaceWidth = (int) (launcher.getWorkspace().getNormalChildWidth() * scale);
int start = barCenter - (workspaceWidth / 2);
int end = barCenter + (workspaceWidth / 2);