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

Commit 009e2a00 authored by Rahul Banerjee's avatar Rahul Banerjee
Browse files

Fix "square corners" appearance of new Back Arrow

This fixes the appearance of the "ENTRY" state, by setting an explicit
corner radius that matches the corners of the "ACTIVE" state.

While doing this, it turned out that the "INACTIVE" and "CANCELLED"
states were reusing the corner radius of the "ENTRY" state, so that
had to be split off into a new constant: "cancelledEdgeCornerRadius"
(this is the radius when the Back Arrow is "squished" against the edge,
 and if let go, will cancel the current gesture)

Bug: 238445578
Test: Manual
Change-Id: Ie5e7df298565f87c4262d79fa6b7960bf8e07977
parent 5e93561c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -59,8 +59,8 @@
    <dimen name="navigation_edge_entry_margin">4dp</dimen>
    <dimen name="navigation_edge_entry_background_width">8dp</dimen>
    <dimen name="navigation_edge_entry_background_height">60dp</dimen>
    <dimen name="navigation_edge_entry_edge_corners">6dp</dimen>
    <dimen name="navigation_edge_entry_far_corners">6dp</dimen>
    <dimen name="navigation_edge_entry_edge_corners">30dp</dimen>
    <dimen name="navigation_edge_entry_far_corners">30dp</dimen>
    <dimen name="navigation_edge_entry_arrow_length">10dp</dimen>
    <dimen name="navigation_edge_entry_arrow_height">7dp</dimen>

@@ -90,6 +90,7 @@

    <dimen name="navigation_edge_cancelled_arrow_length">12dp</dimen>
    <dimen name="navigation_edge_cancelled_arrow_height">0dp</dimen>
    <dimen name="navigation_edge_cancelled_edge_corners">6dp</dimen>

    <!-- Height of notification icons in the status bar -->
    <dimen name="status_bar_icon_size">@*android:dimen/status_bar_icon_size</dimen>
+1 −1
Original line number Diff line number Diff line
@@ -626,7 +626,7 @@ class BackPanelController private constructor(
                            if (currentState == GestureState.INACTIVE ||
                                currentState == GestureState.CANCELLED
                            )
                                params.entryIndicator.backgroundDimens.edgeCornerRadius
                                params.cancelledEdgeCornerRadius
                            else
                                params.activeIndicator.backgroundDimens.edgeCornerRadius
                        )
+4 −0
Original line number Diff line number Diff line
@@ -33,6 +33,8 @@ data class EdgePanelParams(private var resources: Resources) {
        private set
    var fullyStretchedIndicator = BackIndicatorDimens()
        private set
    var cancelledEdgeCornerRadius: Float = 0f
        private set
    var cancelledArrowDimens = ArrowDimens()

    // navigation bar edge constants
@@ -132,6 +134,8 @@ data class EdgePanelParams(private var resources: Resources) {
            )
        )

        cancelledEdgeCornerRadius = getDimen(R.dimen.navigation_edge_cancelled_edge_corners)

        cancelledArrowDimens = ArrowDimens(
            length = getDimen(R.dimen.navigation_edge_cancelled_arrow_length),
            height = getDimen(R.dimen.navigation_edge_cancelled_arrow_height)