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

Commit 35765047 authored by chihtinglo's avatar chihtinglo
Browse files

Style the Magnification Window - Window Mode

Modifying the design of the magnification window in window mode:
1. We change the window to rounded rectangle with styled border.
2. We change the design of the window border when it is in "Edit"
   state.
3. We change the design of the drag handle to a solid shape.

Bug: 257272333
Test: manual - attach videos with the bug
Change-Id: I69310ae7db04cee116021ad951082362efc95fad
parent 00704fa6
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2023 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="rectangle">
            <corners android:radius="@dimen/magnifier_corner_radius" />
            <stroke
                android:color="@color/magnification_border_color"
                android:width="@dimen/magnifier_border_width"/>
        </shape>
    </item>
    <item>
        <shape android:shape="rectangle">
            <corners android:radius="@dimen/magnifier_outer_corner_radius" />
            <stroke
                android:color="@android:color/black"
                android:width="@dimen/magnifier_stroke_width"/>
        </shape>
    </item>
</layer-list>
 No newline at end of file
+36 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2023 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="rectangle">
            <corners android:radius="@dimen/magnifier_edit_corner_radius" />
            <stroke
                android:color="@color/magnification_border_color"
                android:width="@dimen/magnifier_border_width"
                android:dashWidth="@dimen/magnifier_edit_dash_gap"
                android:dashGap="@dimen/magnifier_edit_dash_gap"/>
        </shape>
    </item>
    <item>
        <shape android:shape="rectangle">
            <corners android:radius="@dimen/magnifier_edit_outer_corner_radius" />
            <stroke
                android:color="@android:color/black"
                android:width="@dimen/magnifier_stroke_width"/>
        </shape>
    </item>
</layer-list>
 No newline at end of file
+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?><!--
  ~ Copyright (C) 2023 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
    <size
        android:width="@dimen/magnification_window_drag_corner_size"
        android:height="@dimen/magnification_window_drag_corner_size"/>
    <stroke
        android:color="@android:color/black"
        android:width="@dimen/magnification_window_drag_corner_stroke"/>
    <solid android:color="@color/magnification_drag_corner_background" />
</shape>
 No newline at end of file
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?><!--
  ~ Copyright (C) 2023 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
    <stroke
        android:color="@android:color/black"
        android:width="@dimen/magnifier_stroke_width"/>
    <corners android:radius="@dimen/magnifier_corner_radius" />
    <solid android:color="@color/magnification_border_color" />
</shape>
 No newline at end of file
+26 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2023 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="12dp"
        android:height="12dp"
        android:viewportWidth="12"
        android:viewportHeight="12">
    <path
        android:pathData="M4.304,5.717L8.731,10.141L6.903,11.969L11.959,11.953L11.973,6.899L10.131,8.74L5.703,4.318L3.229,1.843L5.073,0L0,0L0,5.071L1.83,3.243L4.304,5.717Z"
        android:fillColor="#000000"
        android:fillType="evenOdd"/>
</vector>
Loading