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

Commit 61f872f3 authored by Romain Hunault's avatar Romain Hunault 💻
Browse files

Merge branch 'fix-2761' into 'master'

Add /e/ accent color in dialogs and other places

See merge request e/apps/Message!39
parents 4eafa42d 50a2a7ce
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ class TextViewStyler @Inject constructor(

                    else -> return
                }

                setTextColor(when (colorAttr) {
                    COLOR_PRIMARY_ON_THEME -> context.getColorCompat(R.color.textPrimaryDark)
                    COLOR_SECONDARY_ON_THEME -> context.getColorCompat(R.color.textSecondaryDark)
@@ -132,7 +133,7 @@ class TextViewStyler @Inject constructor(
        setTextSize(textView, textSizeAttr)

        if (textView is EditText) {
            val drawable = textView.resources.getDrawable(R.drawable.cursor).apply { setTint(R.color.tools_theme) }
            val drawable = textView.resources.getDrawable(R.drawable.cursor)
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
                textView.textCursorDrawable = drawable
            }
+2 −12
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ package com.moez.QKSMS.common.widget
import android.content.Context
import android.content.res.ColorStateList
import android.util.AttributeSet
import androidx.appcompat.widget.SwitchCompat
import android.widget.Switch
import com.moez.QKSMS.R
import com.moez.QKSMS.common.util.Colors
import com.moez.QKSMS.common.util.extensions.resolveThemeColor
@@ -30,7 +30,7 @@ import com.moez.QKSMS.injection.appComponent
import com.moez.QKSMS.util.Preferences
import javax.inject.Inject

class QkSwitch @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : SwitchCompat(context, attrs) {
class QkSwitch @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : Switch(context, attrs) {

    @Inject
    lateinit var colors: Colors
@@ -52,16 +52,6 @@ class QkSwitch @JvmOverloads constructor(context: Context, attrs: AttributeSet?
                    intArrayOf(-android.R.attr.state_enabled),
                    intArrayOf(android.R.attr.state_checked),
                    intArrayOf())

            thumbTintList = ColorStateList(states, intArrayOf(
                    context.resolveThemeColor(R.attr.switchThumbDisabled),
                    context.getColor(R.color.tools_theme),
                    context.resolveThemeColor(R.attr.switchThumbEnabled)))

            trackTintList = ColorStateList(states, intArrayOf(
                    context.resolveThemeColor(R.attr.switchTrackDisabled),
                    context.getColor(R.color.tools_theme).withAlpha(0x4D),
                    context.resolveThemeColor(R.attr.switchTrackEnabled)))
        }
    }
}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -19,6 +19,6 @@
  -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid android:color="@color/white" />
    <solid android:color="@color/colorAccent" />
    <size android:width="2dp" />
</shape>
+1 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@
    <color name="tools_theme">@lineageos.platform:color/color_default_accent</color>
    <color name="colorPrimary">@lineageos.platform:color/color_default_primary</color>
    <color name="colorPrimaryDark">@lineageos.platform:color/color_default_primary_dark</color>
    <color name="colorAccent">@lineageos.platform:color/color_default_accent</color>
    <color name="selection_color">#EAF5FD</color>

</resources>
+2 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@
        <item name="bubbleColor">@color/bubbleLight</item>
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="composeBackground">@color/backgroundLight</item>
        <item name="selectableItemBackground">@drawable/ripple</item>
        <item name="switchThumbEnabled">@color/switchThumbEnabledLight</item>
@@ -65,6 +66,7 @@
        <item name="bubbleColor">@color/bubbleLight</item>
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="composeBackground">@color/backgroundLight</item>
        <item name="selectableItemBackground">@drawable/ripple</item>
        <item name="windowActionBar">false</item>