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

Commit db1be9d9 authored by chihtinglo's avatar chihtinglo
Browse files

Style panel with Material designs (3/n)

The following components are styled to follow Material designs in this
modification:
1. All image buttons for adjusting magnifier window size
   - The background for image buttons
   - The tint for image buttons
   The icon button will get a background color when it is selected and
   the background color will be cleared when "Edit mode" for the window
   is triggered.

Bug: 257272333
Test: manual - attach screenshots with the bug
Test: atest
SystemUITests:com.android.systemui.accessibility.WindowMagnificationSettingsTest
Change-Id: I300f88be6fb9cc9e4c4bc4eaa7f5bf0e2c124d58
parent 81fff93b
Loading
Loading
Loading
Loading
+22 −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.
  -->
<selector xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
    <item android:state_selected="true"
          android:color="?androidprv:attr/colorAccent"  />
    <item android:color="?androidprv:attr/colorSurfaceVariant" />
</selector>
 No newline at end of file
+22 −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.
  -->
<selector xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
    <item android:state_selected="true"
          android:color="?androidprv:attr/textColorPrimaryInverse"  />
    <item android:color="?androidprv:attr/textColorPrimary" />
</selector>
 No newline at end of file
+30 −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.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?android:attr/colorControlHighlight">
    <item android:id="@android:id/mask">
        <shape android:shape="rectangle">
            <corners android:radius="@dimen/magnification_setting_image_button_corner_radius" />
            <solid android:color="@color/accessibility_magnification_image_button_background" />
        </shape>
    </item>
    <item android:id="@android:id/background">
        <shape android:shape="rectangle">
            <corners android:radius="@dimen/magnification_setting_image_button_corner_radius" />
            <solid android:color="@color/accessibility_magnification_image_button_background" />
        </shape>
    </item>
</ripple>
 No newline at end of file
+22 −28
Original line number Diff line number Diff line
@@ -14,15 +14,9 @@
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
<item android:id="@android:id/mask">
    <shape android:shape="oval">
        <solid android:color="@color/accessibility_magnifier_bg" />
        <size
            android:width="56dp"
            android:height="56dp"/>
        <corners android:radius="2dp"/>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    android:shape="rectangle">
    <solid android:color="?androidprv:attr/colorSurfaceVariant" />
    <corners android:radius="@dimen/magnification_setting_image_button_background_corner_radius" />
</shape>
 No newline at end of file
</item>
</ripple>
 No newline at end of file
+9 −15
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2020 The Android Open Source Project
  ~ 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.
@@ -14,18 +14,12 @@
  ~ limitations under the License.
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="36dp"
    android:height="36dp"
    android:viewportWidth="24"
    android:viewportHeight="24">
    <group>
        <clip-path
            android:pathData="M0,0h24v24h-24z"/>
    android:width="48dp"
    android:height="48dp"
    android:viewportWidth="48"
    android:viewportHeight="48"
    android:tint="?attr/colorControlNormal">
    <path
            android:pathData="M11,6.05V8.05H14.59L8,14.64V11.05H6V18.05H13V16.05H9.41L16,9.46V13.05H18V6.05H11Z"
            android:fillColor="#000000"/>
        <path
            android:pathData="M20,4.05V20.05H4V4.05H20ZM22,2.05H2V22.05H22V2.05Z"
            android:fillColor="#000000"/>
    </group>
        android:fillColor="@android:color/white"
        android:pathData="M6,42V27H9V36.9L36.9,9H27V6H42V21H39V11.1L11.1,39H21V42Z"/>
</vector>
Loading