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

Commit 72dbd11c authored by Beverly's avatar Beverly
Browse files

Adjust window rounded corners

Test: manual
Fixes: 136652290
Change-Id: I969b00528e269da16021387cb8298e05aeeb63ab
parent 3d9cc127
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -36,13 +36,16 @@ public class ScreenDecorationsUtils {
        }

        // Radius that should be used in case top or bottom aren't defined.
        float defaultRadius = resources.getDimension(R.dimen.rounded_corner_radius);
        float defaultRadius = resources.getDimension(R.dimen.rounded_corner_radius)
                - resources.getDimension(R.dimen.rounded_corner_radius_adjustment);

        float topRadius = resources.getDimension(R.dimen.rounded_corner_radius_top);
        float topRadius = resources.getDimension(R.dimen.rounded_corner_radius_top)
                - resources.getDimension(R.dimen.rounded_corner_radius_top_adjustment);
        if (topRadius == 0f) {
            topRadius = defaultRadius;
        }
        float bottomRadius = resources.getDimension(R.dimen.rounded_corner_radius_bottom);
        float bottomRadius = resources.getDimension(R.dimen.rounded_corner_radius_bottom)
                - resources.getDimension(R.dimen.rounded_corner_radius_bottom_adjustment);
        if (bottomRadius == 0f) {
            bottomRadius = defaultRadius;
        }
+18 −0
Original line number Diff line number Diff line
@@ -90,6 +90,24 @@
        orientation. If zero, the value of rounded_corner_radius is used. -->
    <dimen name="rounded_corner_radius_bottom">0dp</dimen>

    <!-- Default adjustment for the software rounded corners since corners are not perfectly
        round. This value is used when retrieving the "radius" of the rounded corner in cases
        where the exact bezier curve cannot be retrieved.  This value will be subtracted from
        rounded_corner_radius to more accurately provide a "radius" for the rounded corner. -->
    <dimen name="rounded_corner_radius_adjustment">0px</dimen>
    <!-- Top adjustment for the software rounded corners since corners are not perfectly
        round.  This value is used when retrieving the "radius" of the top rounded corner in cases
        where the exact bezier curve cannot be retrieved.  This value will be subtracted from
        rounded_corner_radius_top to more accurately provide a "radius" for the top rounded corners.
         -->
    <dimen name="rounded_corner_radius_top_adjustment">0px</dimen>
    <!-- Bottom adjustment for the software rounded corners since corners are not perfectly
        round.  This value is used when retrieving the "radius" of the bottom rounded corner in
        cases where the exact bezier curve cannot be retrieved.  This value will be subtracted from
        rounded_corner_radius_bottom to more accurately provide a "radius" for the bottom rounded
        corners. -->
    <dimen name="rounded_corner_radius_bottom_adjustment">0px</dimen>

    <!-- Width of the window of the divider bar used to resize docked stacks. -->
    <dimen name="docked_stack_divider_thickness">48dp</dimen>

+3 −0
Original line number Diff line number Diff line
@@ -3703,6 +3703,9 @@
  <java-symbol type="dimen" name="rounded_corner_radius" />
  <java-symbol type="dimen" name="rounded_corner_radius_top" />
  <java-symbol type="dimen" name="rounded_corner_radius_bottom" />
  <java-symbol type="dimen" name="rounded_corner_radius_adjustment" />
  <java-symbol type="dimen" name="rounded_corner_radius_top_adjustment" />
  <java-symbol type="dimen" name="rounded_corner_radius_bottom_adjustment" />
  <java-symbol type="bool" name="config_supportsRoundedCornersOnWindows" />

  <java-symbol type="string" name="config_defaultModuleMetadataProvider" />