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

Commit 49811184 authored by Jon Miranda's avatar Jon Miranda
Browse files

Only inset widgets if workspaceTopPadding is greater than the widget padding.

This prevents widget from becoming too close to status bar.

Bug: 189724771
Test: manual
Change-Id: I86f83b6a35bd2802bdbdf175340a379b498f481d
parent d9463fbf
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -399,8 +399,10 @@ public class DeviceProfile {
    public boolean shouldInsetWidgets() {
        Rect widgetPadding = inv.defaultWidgetPadding;

        // Check all sides to ensure that the widget won't overlap into another cell.
        return cellLayoutBorderSpacingPx > widgetPadding.left
        // Check all sides to ensure that the widget won't overlap into another cell, or into
        // status bar.
        return workspaceTopPadding > widgetPadding.top
                && cellLayoutBorderSpacingPx > widgetPadding.left
                && cellLayoutBorderSpacingPx > widgetPadding.top
                && cellLayoutBorderSpacingPx > widgetPadding.right
                && cellLayoutBorderSpacingPx > widgetPadding.bottom;