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

Commit 5e6ce51f authored by Galia Peycheva's avatar Galia Peycheva
Browse files

Make TV volume icons outlined instead of filled

This change adds new svns for the TV icons and adds a translateX tag to
move them left/right so that they align.

Here we also add a config for whether to have different icons for volume
"off" and volume "mute". The new icon ic_volume_media_off is used to
signify when the volume has been disabled (e.g. by a dedicated remote control
button press). This is different from ic_volume_media_mute, which signifies that
the volume has been set to 0. In the "off" position, the volume is also set
to 0, but the volume dialog remembers the previous setting, so when +/-
is pressed, this is relative to the previous setting.

By default ic_volume_media_off is the same as ic_volume_media_mute. Only on
drawable-television/ do we set a dedicated icon for ic_volume_media_off.

Bug: 167732325
Test: m && flash && verify icons have been changed
Change-Id: I8d6a6c2b971974894e5062d652bf905f38bf8e83
parent ab1b941f
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -16,11 +16,11 @@
  -->
  -->


<vector xmlns:android="http://schemas.android.com/apk/res/android"
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:width="@dimen/tv_volume_icons_size"
    android:height="24dp"
    android:height="@dimen/tv_volume_icons_size"
    android:viewportWidth="24.0"
    android:viewportWidth="24.0"
    android:viewportHeight="24.0">
    android:viewportHeight="24.0">
    <path
    <path
        android:fillColor="@color/tv_volume_dialog_accent"
        android:fillColor="@color/tv_volume_dialog_accent"
        android:pathData="M3,9v6h4l5,5L12,4L7,9L3,9zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77s-2.99,-7.86 -7,-8.77z"/>
        android:pathData="M3,9v6h4l5,5L12,4L7,9L3,9zM10,8.83v6.34L7.83,13L5,13v-2h2.83L10,8.83zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77 0,-4.28 -2.99,-7.86 -7,-8.77z"/>
</vector>
</vector>
+7 −5
Original line number Original line Diff line number Diff line
@@ -16,11 +16,13 @@
  -->
  -->


<vector xmlns:android="http://schemas.android.com/apk/res/android"
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:width="@dimen/tv_volume_icons_size"
    android:height="24dp"
    android:height="@dimen/tv_volume_icons_size"
    android:viewportWidth="24.0"
    android:viewportWidth="24.0"
    android:viewportHeight="24.0">
    android:viewportHeight="24.0">
    <group android:translateX="-2">
        <path
        <path
            android:fillColor="@color/tv_volume_dialog_accent"
            android:fillColor="@color/tv_volume_dialog_accent"
        android:pathData="M3,15V9H7L12,4V20L7,15H3ZM14,7.97C15.48,8.71 16.5,10.23 16.5,12C16.5,13.77 15.48,15.29 14,16.02V7.97Z"/>
            android:pathData="M16,7.97v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02 0,-1.77 -1.02,-3.29 -2.5,-4.03zM5,9v6h4l5,5L14,4L9,9L5,9zM12,8.83v6.34L9.83,13L7,13v-2h2.83L12,8.83z"/>
    </group>
</vector>
</vector>
+7 −6
Original line number Original line Diff line number Diff line
@@ -16,12 +16,13 @@
  -->
  -->


<vector xmlns:android="http://schemas.android.com/apk/res/android"
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:width="@dimen/tv_volume_icons_size"
    android:height="24dp"
    android:height="@dimen/tv_volume_icons_size"
    android:viewportWidth="24.0"
    android:viewportWidth="24.0"
    android:viewportHeight="24.0">
    android:viewportHeight="24.0">
    <group android:translateX="-4">
        <path
        <path
            android:fillColor="@color/tv_volume_dialog_accent"
            android:fillColor="@color/tv_volume_dialog_accent"
        android:pathData="M16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v2.21l2.45,2.45c0.03,-0.2 0.05,-0.41 0.05,-0.63zM19,12c0,0.94 -0.2,1.82 -0.54,2.64l1.51,1.51C20.63,14.91 21,13.5 21,12c0,-4.28 -2.99,-7.86 -7,-8.77v2.06c2.89,0.86 5,3.54 5,6.71zM4.27,3L3,4.27 7.73,9L3,9v6h4l5,5v-6.73l4.25,4.25c-0.67,0.52 -1.42,0.93 -2.25,1.18v2.06c1.38,-0.31 2.63,-0.95 3.69,-1.81L19.73,21 21,19.73l-9,-9L4.27,3zM12,4L9.91,6.09 12,8.18L12,4z"/>
            android:pathData="M14,8.83v6.34L11.83,13H9v-2h2.83L14,8.83M16,4l-5,5H7v6h4l5,5V4z"/>
    </group>
</vector>
</vector>
+26 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2020 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="@dimen/tv_volume_icons_size"
    android:height="@dimen/tv_volume_icons_size"
    android:viewportHeight="24"
    android:viewportWidth="24">
    <path
        android:fillColor="@color/tv_volume_dialog_accent"
        android:pathData="M4.34,2.93L2.93,4.34 7.29,8.7 7,9L3,9v6h4l5,5v-6.59l4.18,4.18c-0.65,0.49 -1.38,0.88 -2.18,1.11v2.06c1.34,-0.3 2.57,-0.92 3.61,-1.75l2.05,2.05 1.41,-1.41L4.34,2.93zM10,15.17L7.83,13L5,13v-2h2.83l0.88,-0.88L10,11.41v3.76zM19,12c0,0.82 -0.15,1.61 -0.41,2.34l1.53,1.53c0.56,-1.17 0.88,-2.48 0.88,-3.87 0,-4.28 -2.99,-7.86 -7,-8.77v2.06c2.89,0.86 5,3.54 5,6.71zM12,4l-1.88,1.88L12,7.76zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v1.79l2.48,2.48c0.01,-0.08 0.02,-0.16 0.02,-0.24z"/>
</vector>
+20 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2020 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">
    <item android:drawable="@drawable/ic_volume_media_mute" />
</selector>
Loading