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

Commit 2f8a4a66 authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Android (Google) Code Review
Browse files

Merge "[SB][Chips] Add tint for decorative icon" into main

parents 03ca2608 1803a1d4
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -202,11 +202,16 @@ private fun ChipBody(
        }

        model.decorativeIcon?.let {
            val context = LocalContext.current
            Icon(
                icon = it.icon,
                tint = Color(it.colors.text(context)),
                modifier =
                    modifier
                        .background(color = it.backgroundColor, shape = it.backgroundShape)
                        .background(
                            color = Color(it.colors.background(context).defaultColor),
                            shape = it.backgroundShape,
                        )
                        .padding(vertical = 2.dp, horizontal = 8.dp)
                        .size(12.dp),
            )
+1 −6
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import android.annotation.StringRes
import android.os.SystemClock
import android.view.View
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import com.android.internal.logging.InstanceId
import com.android.systemui.animation.ComposableControllerFactory
@@ -288,9 +287,5 @@ sealed class OngoingActivityChipModel {
    )

    /** Represents a decorative icon to show on the right side of the chip. */
    data class DecorativeIcon(
        val icon: Icon,
        val backgroundColor: Color,
        val backgroundShape: Shape,
    )
    data class DecorativeIcon(val icon: Icon, val backgroundShape: Shape, val colors: ColorsModel)
}