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

Commit df7f662c authored by Nishith  Khanna's avatar Nishith Khanna
Browse files

Theme system components according to our palette

parent f65acda0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1034,7 +1034,7 @@ public class Switch extends CompoundButton {
        }

        final int switchWidth = Math.max(mSwitchMinWidth,
                2 * mThumbWidth + paddingLeft + paddingRight);
                (int) (1.8 * mThumbWidth) + paddingLeft + paddingRight);
        final int switchHeight = Math.max(trackHeight, thumbHeight);
        mSwitchWidth = switchWidth;
        mSwitchHeight = switchHeight;
+4 −4
Original line number Diff line number Diff line
@@ -16,9 +16,9 @@

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_enabled="false"
          android:color="?attr/colorForeground"
          android:alpha="?attr/disabledAlpha" />
          android:color="#C8CED0"
          android:alpha="0.75" />
    <item android:state_checked="true"
          android:color="?attr/colorControlActivated" />
    <item android:color="?attr/colorForeground" />
          android:color="#2CC766" />
    <item android:color="#C8CED0" />
</selector>
+134 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright Murena SAS 2022
  ~ This program is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~  along with this program.  If not, see <https://www.gnu.org/licenses/>.
  -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape
            android:shape="oval">
            <solid android:color="#05757575"/>
            <size android:width="25dp" android:height="25dp"/>
        </shape>
    </item>
    <item
        android:top="0.2dp"
        android:bottom="0.2dp"
        android:left="0.2dp"
        android:right="0.2dp">
        <shape
            android:shape="oval">
            <solid android:color="#05757575"/>
            <size android:width="25dp" android:height="25dp"/>
        </shape>
    </item>
    <item
        android:top="0.4dp"
        android:bottom="0.4dp"
        android:left="0.4dp"
        android:right="0.4dp">
        <shape
            android:shape="oval">
            <solid android:color="#05757575"/>
            <size android:width="25dp" android:height="25dp"/>
        </shape>
    </item>
    <item
        android:top="0.6dp"
        android:bottom="0.6dp"
        android:left="0.6dp"
        android:right="0.6dp">
        <shape
            android:shape="oval">
            <solid android:color="#05757575"/>
            <size android:width="25dp" android:height="25dp"/>
        </shape>
    </item>
    <item
        android:top="0.8dp"
        android:bottom="0.8dp"
        android:left="0.8dp"
        android:right="0.8dp">
        <shape
            android:shape="oval">
            <solid android:color="#05757575"/>
            <size android:width="25dp" android:height="25dp"/>
        </shape>
    </item>
    <item
        android:top="1.0dp"
        android:bottom="1.0dp"
        android:left="1.0dp"
        android:right="1.0dp">
        <shape
            android:shape="oval">
            <solid android:color="#05757575"/>
            <size android:width="25dp" android:height="25dp"/>
        </shape>
    </item>
    <item
        android:top="1.2dp"
        android:bottom="1.2dp"
        android:left="1.2dp"
        android:right="1.2dp">
        <shape
            android:shape="oval">
            <solid android:color="#05757575"/>
            <size android:width="25dp" android:height="25dp"/>
        </shape>
    </item>
    <item
        android:top="1.4dp"
        android:bottom="1.4dp"
        android:left="1.4dp"
        android:right="1.4dp">
        <shape
            android:shape="oval">
            <solid android:color="#05757575"/>
            <size android:width="25dp" android:height="25dp"/>
        </shape>
    </item>
    <item
        android:top="1.6dp"
        android:bottom="1.6dp"
        android:left="1.6dp"
        android:right="1.6dp">
        <shape
            android:shape="oval">
            <solid android:color="#05757575"/>
            <size android:width="25dp" android:height="25dp"/>
        </shape>
    </item>
    <item
        android:top="1.8dp"
        android:bottom="1.8dp"
        android:left="1.8dp"
        android:right="1.8dp">
        <shape
            android:shape="oval">
            <solid android:color="#05757575"/>
            <size android:width="25dp" android:height="25dp"/>
        </shape>
    </item>
    <item android:top="2dp"
        android:bottom="2dp"
        android:left="2dp"
        android:right="2dp">
        <shape
            android:shape="oval">
            <solid android:color="#ffffff"/>
            <size android:width="24dp" android:height="24dp"/>
        </shape>
    </item>
</layer-list>
+26 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright Murena SAS 2022
  ~ This program is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~  along with this program.  If not, see <https://www.gnu.org/licenses/>.
  -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:gravity="center_vertical|fill_horizontal">
        <shape android:shape="rectangle"
               android:tint="@color/switch_track_material">
            <corners android:radius="14dp" />
            <solid android:color="@color/white" />
            <size android:height="28dp" />
        </shape>
    </item>
</layer-list>
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -657,8 +657,8 @@ please see styles_device_defaults.xml.
    </style>

    <style name="Widget.Material.CompoundButton.Switch">
        <item name="track">@drawable/switch_track_material</item>
        <item name="thumb">@drawable/switch_thumb_material_anim</item>
        <item name="track">@drawable/e_switch_track</item>
        <item name="thumb">@drawable/e_switch_thumb</item>
        <item name="switchTextAppearance">@style/TextAppearance.Material.Widget.Switch</item>
        <item name="textOn">@string/capital_on</item>
        <item name="textOff">@string/capital_off</item>
Loading