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

Commit 63f5954c authored by Bruno Martins's avatar Bruno Martins
Browse files

LineageParts: Fix dark theme issues

This brings SwitchBar widget inline with 10 and fixes the
theme issues when the dark mode is enabled.

Change-Id: Id2172048aa72a8bffdde0fc09769cda902f7ba63
parent 0ea7cebe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@
              android:maxLines="2"
              android:ellipsize="end"
              android:textAppearance="@style/TextAppearance.Switch"
              android:textColor="?android:attr/textColorPrimary"
              android:textColor="?android:attr/textColorPrimaryInverse"
              android:textAlignment="viewStart" />

    <org.lineageos.lineageparts.widget.ToggleSwitch
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 The LineageOS 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.
-->

<resources>
    <color name="switchbar_switch_track_tint">#82000000</color>
    <color name="switchbar_switch_thumb_tint">@android:color/black</color>
</resources>
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2018 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.
-->

<resources>
    <style name="ThemeOverlay.SwitchBar.Settings" parent="ThemeOverlay.SwitchBar.Settings.Base">
        <item name="android:textColorPrimaryInverse">@android:color/black</item>
    </style>
</resources>
+4 −2
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
	Copyright (C) 2016 The CyanogenMod Project
	Copyright (C) 2019 The LineageOS Project
	              2019-2020 The LineageOS Project

	Licensed under the Apache License, Version 2.0 (the "License");
	you may not use this file except in compliance with the License.
@@ -16,7 +16,9 @@
	limitations under the License.
-->
<resources>
    <color name="switch_bar_background">#ff80868B</color>
    <color name="switchbar_background_color">@*android:color/material_grey_600</color>
    <color name="switchbar_switch_track_tint">#BFFFFFFF</color>
    <color name="switchbar_switch_thumb_tint">@android:color/white</color>

    <color name="fab_ripple">#1fffffff</color><!-- 12% white -->
    <color name="fab_shape">?android:attr/colorAccent</color>
+6 −3
Original line number Diff line number Diff line
@@ -55,18 +55,21 @@
        <item name="contentInsetStart">@dimen/actionbar_contentInsetStart</item>
    </style>

    <style name="ThemeOverlay.SwitchBar.Settings" parent="@android:style/ThemeOverlay.Material.ActionBar">
        <item name="android:textColorPrimary">@android:color/white</item>
    <style name="ThemeOverlay.SwitchBar.Settings.Base" parent="@*android:style/ThemeOverlay.DeviceDefault.ActionBar">
        <item name="android:elevation">1dp</item>
        <item name="switchBarMarginStart">@dimen/switchbar_margin_start</item>
        <item name="switchBarMarginEnd">@dimen/switchbar_margin_end</item>
        <item name="switchBarBackgroundColor">@color/switch_bar_background</item>
        <item name="switchBarBackgroundColor">@color/switchbar_background_color</item>
        <item name="switchBarBackgroundActivatedColor">?android:attr/colorAccent</item>
    </style>

    <style name="ThemeOverlay.SwitchBar.Settings" parent="ThemeOverlay.SwitchBar.Settings.Base"/>

    <style name="Widget.SwitchBar.Switch" parent="@android:style/Widget.Material.CompoundButton.Switch">
        <item name="android:trackTint">@color/switchbar_switch_track_tint</item>
        <item name="android:thumbTint">@color/switchbar_switch_thumb_tint</item>
        <item name="android:minHeight">@dimen/min_tap_target_size</item>
        <item name="android:minWidth">@dimen/min_tap_target_size</item>
    </style>

    <style name="Theme.DialogWhenLarge" parent="@*android:style/Theme.Material.Settings.DialogWhenLarge">