diff options
| author | 2019-07-11 20:01:41 +0000 | |
|---|---|---|
| committer | 2019-07-11 20:01:41 +0000 | |
| commit | dcba632b4116f58b3ed3b082c53a15355a90309e (patch) | |
| tree | 0d18eb564e68d6e805fe6512c8239375ee72e2ad | |
| parent | edee6e6c2a4d75f7ec65ab882f77547f0181da65 (diff) | |
| parent | 72dbd11ccddced2ffbe8af37befef6d245f7b834 (diff) | |
Merge "Adjust window rounded corners" into qt-r1-dev
| -rw-r--r-- | core/java/com/android/internal/policy/ScreenDecorationsUtils.java | 9 | ||||
| -rw-r--r-- | core/res/res/values/dimens.xml | 18 | ||||
| -rw-r--r-- | core/res/res/values/symbols.xml | 3 |
3 files changed, 27 insertions, 3 deletions
diff --git a/core/java/com/android/internal/policy/ScreenDecorationsUtils.java b/core/java/com/android/internal/policy/ScreenDecorationsUtils.java index adf7692adc56..52172cf04362 100644 --- a/core/java/com/android/internal/policy/ScreenDecorationsUtils.java +++ b/core/java/com/android/internal/policy/ScreenDecorationsUtils.java @@ -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; } diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index 5363ef920886..039bc4d925a1 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -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> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 0043826ed65f..7c563f2331ba 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -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" /> |