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

Commit db31b2c1 authored by Inhishonor's avatar Inhishonor Committed by Luca Stefani
Browse files

Twelve: Fix contrast issues on chip

Currently, in some cases, the text on the chip menu was difficult to read. This fixes that by setting the text and icon color to correspond with the chip color.

Change-Id: Ie116023beedf0ff6d6a07e205f2ebe85d045eaf8
parent b93c6c04
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -47,9 +47,14 @@ class SortingChip @JvmOverloads constructor(
            context,
            com.google.android.material.R.attr.colorPrimaryContainer
        )
        val chipContentColor = MaterialColors.getColor(
            this,
            com.google.android.material.R.attr.colorOnPrimaryContainer
        )
        chipStrokeWidth = 0f

        setText(R.string.sort_by_unknown)
        setTextColor(chipContentColor)

        setCloseIcon(R.drawable.ic_arrow_drop_down)

@@ -117,7 +122,7 @@ class SortingChip @JvmOverloads constructor(
        isChipIconVisible = true
        chipIconTint = MaterialColors.getColorStateListOrNull(
            context,
            com.google.android.material.R.attr.colorOnSurface
            com.google.android.material.R.attr.colorOnPrimaryContainer
        )
    }

@@ -126,7 +131,7 @@ class SortingChip @JvmOverloads constructor(
        isCloseIconVisible = true
        closeIconTint = MaterialColors.getColorStateListOrNull(
            context,
            com.google.android.material.R.attr.colorOnSurface
            com.google.android.material.R.attr.colorOnPrimaryContainer
        )
    }