Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9053b907 authored by Tony Wickham's avatar Tony Wickham
Browse files

Fix spring loaded scale when taskbar is present

Test: scaled workspace doesn't overlap QSB during drag and drop
Bug: 171917176
Change-Id: I56c7ee834e2c3ee2c796e88e83f75dbd24d28bd5
parent 4076cae8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -59,10 +59,11 @@ public class SpringLoadedState extends LauncherState {

        float scale = grid.workspaceSpringLoadShrinkFactor;
        Rect insets = launcher.getDragLayer().getInsets();
        int insetsBottom = grid.isTaskbarPresent ? grid.taskbarSize : insets.bottom;

        float scaledHeight = scale * ws.getNormalChildHeight();
        float shrunkTop = insets.top + grid.dropTargetBarSizePx;
        float shrunkBottom = ws.getMeasuredHeight() - insets.bottom
        float shrunkBottom = ws.getMeasuredHeight() - insetsBottom
                - grid.workspacePadding.bottom
                - grid.workspaceSpringLoadedBottomSpace;
        float totalShrunkSpace = shrunkBottom - shrunkTop;