zeus: overlay: Import display cutout and rounded corner configurations
Change-Id: I169f8b61c3f1345e3b612db8f9c15dd4963e6425
This commit is contained in:
parent
2f0393d907
commit
85b3cab69c
2 changed files with 46 additions and 0 deletions
32
overlay/Frameworks/res/values/config.xml
Normal file
32
overlay/Frameworks/res/values/config.xml
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2023 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<!-- The bounding path of the cutout region of the main built-in display.
|
||||
Must either be empty if there is no cutout region, or a string that is parsable by
|
||||
{@link android.util.PathParser}.
|
||||
|
||||
The path is assumed to be specified in display coordinates with pixel units and in
|
||||
the display's native orientation, with the origin of the coordinate system at the
|
||||
center top of the display. Optionally, you can append either `@left` or `@right` to the
|
||||
end of the path string, in order to change the path origin to either the top left,
|
||||
or top right of the display.
|
||||
|
||||
To facilitate writing device-independent emulation overlays, the marker `@dp` can be
|
||||
appended after the path string to interpret coordinates in dp instead of px units.
|
||||
Note that a physical cutout should be configured in pixels for the best results.
|
||||
|
||||
If the display supports multiple resolutions, please define the path config based on the
|
||||
highest resolution so that it can be scaled correctly in each resolution.
|
||||
|
||||
Example for a 10px x 10px square top-center cutout:
|
||||
<string ...>M -5,0 L -5,10 L 5,10 L 5,0 Z</string>
|
||||
Example for a 10dp x 10dp square top-center cutout:
|
||||
<string ...>M -5,0 L -5,10 L 5,10 L 5,0 Z @dp</string>
|
||||
|
||||
@see https://www.w3.org/TR/SVG/paths.html#PathData
|
||||
-->
|
||||
<string name="config_mainBuiltInDisplayCutout" translatable="false">M 0,0 H -42 V 108 H 42 V 0 H 0 Z</string>
|
||||
</resources>
|
14
overlay/Frameworks/res/values/dimens.xml
Normal file
14
overlay/Frameworks/res/values/dimens.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2023 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<!-- Radius of the software rounded corners at the top of the display in its natural
|
||||
orientation. If zero, the value of rounded_corner_radius is used. -->
|
||||
<dimen name="rounded_corner_radius_top">120.0px</dimen>
|
||||
|
||||
<!-- Radius of the software rounded corners at the bottom of the display in its natural
|
||||
orientation. If zero, the value of rounded_corner_radius is used. -->
|
||||
<dimen name="rounded_corner_radius_bottom">111.0px</dimen>
|
||||
</resources>
|
Loading…
Reference in a new issue