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

Commit b8c0595d authored by Thales Lima's avatar Thales Lima
Browse files

Add new hotseat bottom margin options

This changes how the hotseat height is calculated and by consequence how spaces are distributed in the workspace as well. This is the first of a series of changes that will improve and streamline workspace calculations.

Bug: 228998463
Fix: 234023782
Fix: 230191631
Fix: 232914299
Fix: 236238226
Test: manual, HSV and comparing to mocks
Change-Id: If021e8ba2c7c24c0bf9f27a1aa7aa946792ed04f
parent 0f8bbef7
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -298,9 +298,7 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
                        isRtl ? -halfQsbIconWidthDiff : halfQsbIconWidthDiff,
                        isRtl ? -halfQsbIconWidthDiff : halfQsbIconWidthDiff,
                        hotseatIconCenter - childCenter, LINEAR);
                        hotseatIconCenter - childCenter, LINEAR);


                int qsbContentHeight = child.getHeight() - child.getPaddingTop()
                float scale = ((float) taskbarDp.iconSizePx) / launcherDp.hotseatQsbVisualHeight;
                        - child.getPaddingBottom();
                float scale = ((float) taskbarDp.iconSizePx) / qsbContentHeight;
                setter.addFloat(child, SCALE_PROPERTY, scale, 1f, LINEAR);
                setter.addFloat(child, SCALE_PROPERTY, scale, 1f, LINEAR);


                setter.addFloat(child, VIEW_ALPHA, 0f, 1f,
                setter.addFloat(child, VIEW_ALPHA, 0f, 1f,
+5 −5
Original line number Original line Diff line number Diff line
@@ -48,8 +48,8 @@ class DeviceProfileQuickstepTest : DeviceProfileBaseTest() {


        val dp = newDP()
        val dp = newDP()


        assertThat(dp.cellLayoutWidth).isEqualTo(1235)
        assertThat(dp.cellLayoutWidth).isEqualTo(1237)
        assertThat(dp.cellLayoutHeight).isEqualTo(1235)
        assertThat(dp.cellLayoutHeight).isEqualTo(1215)
    }
    }


    @Test
    @Test
@@ -67,8 +67,8 @@ class DeviceProfileQuickstepTest : DeviceProfileBaseTest() {


        val dp = newDP()
        val dp = newDP()


        assertThat(dp.getCellSize().y).isEqualTo(264)
        assertThat(dp.getCellSize().y).isEqualTo(260)
        assertThat(dp.getCellSize().x).isEqualTo(258)
        assertThat(dp.getCellSize().x).isEqualTo(259)
    }
    }


    @Test
    @Test
@@ -117,6 +117,6 @@ class DeviceProfileQuickstepTest : DeviceProfileBaseTest() {


        assertThat(dp.isVerticalBarLayout).isEqualTo(false)
        assertThat(dp.isVerticalBarLayout).isEqualTo(false)
        assertThat(dp.cellLayoutSpringLoadShrunkTop).isEqualTo(364)
        assertThat(dp.cellLayoutSpringLoadShrunkTop).isEqualTo(364)
        assertThat(dp.cellLayoutSpringLoadShrunkBottom).isEqualTo(2199)
        assertThat(dp.cellLayoutSpringLoadShrunkBottom).isEqualTo(2185)
    }
    }
}
}
 No newline at end of file
+18 −0
Original line number Original line Diff line number Diff line
@@ -329,6 +329,24 @@
        <!-- defaults to hotseatBorderSpace, if not specified -->
        <!-- defaults to hotseatBorderSpace, if not specified -->
        <attr name="hotseatBorderSpaceTwoPanelPortrait" format="float" />
        <attr name="hotseatBorderSpaceTwoPanelPortrait" format="float" />


        <!-- defaults to res.hotseat_bar_bottom_space_default, if not specified -->
        <attr name="hotseatBarBottomSpace" format="float" />
        <!-- defaults to hotseatBarBottomSpace, if not specified -->
        <attr name="hotseatBarBottomSpaceLandscape" format="float" />
        <!-- defaults to hotseatBarBottomSpace, if not specified -->
        <attr name="hotseatBarBottomSpaceTwoPanelLandscape" format="float" />
        <!-- defaults to hotseatBarBottomSpace, if not specified -->
        <attr name="hotseatBarBottomSpaceTwoPanelPortrait" format="float" />

        <!-- defaults to res.hotseat_qsb_space_default, if not specified -->
        <attr name="hotseatQsbSpace" format="float" />
        <!-- defaults to hotseatQsbSpace, if not specified -->
        <attr name="hotseatQsbSpaceLandscape" format="float" />
        <!-- defaults to hotseatQsbSpace, if not specified -->
        <attr name="hotseatQsbSpaceTwoPanelLandscape" format="float" />
        <!-- defaults to hotseatQsbSpace, if not specified -->
        <attr name="hotseatQsbSpaceTwoPanelPortrait" format="float" />

        <attr name="iconImageSize" format="float" />
        <attr name="iconImageSize" format="float" />
        <!-- defaults to iconImageSize, if not specified -->
        <!-- defaults to iconImageSize, if not specified -->
        <attr name="iconSizeLandscape" format="float" />
        <attr name="iconSizeLandscape" format="float" />
+5 −0
Original line number Original line Diff line number Diff line
@@ -130,6 +130,11 @@
    <item type="id" name="search_container_all_apps" />
    <item type="id" name="search_container_all_apps" />
    <item type="id" name="search_container_hotseat" />
    <item type="id" name="search_container_hotseat" />


    <!-- Scalable Grid configuration -->
    <!-- This is a float because it is converted to dp later in DeviceProfile -->
    <dimen name="hotseat_bar_bottom_space_default">48</dimen>
    <dimen name="hotseat_qsb_space_default">0</dimen>

    <!-- Recents -->
    <!-- Recents -->
    <item type="id" name="overview_panel"/>
    <item type="id" name="overview_panel"/>


+2 −7
Original line number Original line Diff line number Diff line
@@ -32,10 +32,7 @@
    <dimen name="dynamic_grid_cell_padding_x">8dp</dimen>
    <dimen name="dynamic_grid_cell_padding_x">8dp</dimen>


    <!-- Hotseat -->
    <!-- Hotseat -->
    <dimen name="dynamic_grid_hotseat_top_padding">8dp</dimen>
    <dimen name="dynamic_grid_hotseat_bottom_padding">2dp</dimen>
    <dimen name="dynamic_grid_hotseat_bottom_tall_padding">0dp</dimen>
    <dimen name="dynamic_grid_hotseat_bottom_tall_padding">0dp</dimen>
    <dimen name="inline_qsb_bottom_margin">0dp</dimen>
    <dimen name="spring_loaded_hotseat_top_margin">76dp</dimen>
    <dimen name="spring_loaded_hotseat_top_margin">76dp</dimen>


    <!-- Qsb -->
    <!-- Qsb -->
@@ -44,13 +41,10 @@
      it is close to the bottom of the screen -->
      it is close to the bottom of the screen -->
    <item name="qsb_center_factor" format="float" type="dimen">0.325</item>
    <item name="qsb_center_factor" format="float" type="dimen">0.325</item>


    <!-- Extra bottom padding for non-tall devices. -->
    <dimen name="dynamic_grid_hotseat_bottom_non_tall_padding">0dp</dimen>
    <dimen name="dynamic_grid_hotseat_extra_vertical_size">34dp</dimen>
    <dimen name="dynamic_grid_hotseat_side_padding">0dp</dimen>
    <dimen name="dynamic_grid_hotseat_side_padding">0dp</dimen>


    <!-- Scalable Grid -->
    <!-- Scalable Grid -->
    <dimen name="scalable_grid_qsb_bottom_margin">42dp</dimen>
    <dimen name="min_qsb_margin">8dp</dimen>


    <!-- Workspace page indicator -->
    <!-- Workspace page indicator -->
    <dimen name="workspace_page_indicator_height">24dp</dimen>
    <dimen name="workspace_page_indicator_height">24dp</dimen>
@@ -364,6 +358,7 @@
    <dimen name="taskbar_size">0dp</dimen>
    <dimen name="taskbar_size">0dp</dimen>
    <dimen name="taskbar_stashed_size">0dp</dimen>
    <dimen name="taskbar_stashed_size">0dp</dimen>
    <dimen name="qsb_widget_height">0dp</dimen>
    <dimen name="qsb_widget_height">0dp</dimen>
    <dimen name="qsb_shadow_height">0dp</dimen>
    <dimen name="taskbar_icon_size">44dp</dimen>
    <dimen name="taskbar_icon_size">44dp</dimen>
    <!-- Note that this applies to both sides of all icons, so visible space is double this. -->
    <!-- Note that this applies to both sides of all icons, so visible space is double this. -->
    <dimen name="taskbar_icon_spacing">8dp</dimen>
    <dimen name="taskbar_icon_spacing">8dp</dimen>
Loading