mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Move spring loaded scale calculation to DeviceProfile.
Fix: 229838395 Test: manual Change-Id: I6dbbc850e88aaacceb1363e342404b06104f8c10
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user