From 1bc38864da03ec415b6a9fae94c87726a7e4010d Mon Sep 17 00:00:00 2001 From: Tangem Date: Sat, 16 Sep 2023 15:47:40 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .../ui/components/marketprice/MarketPriceBlock.kt | 12 ++++++++---- core/ui/src/main/res/drawable/ic_arrow_down_8.xml | 9 +++++++++ core/ui/src/main/res/drawable/ic_arrow_up_8.xml | 9 +++++++++ core/ui/src/main/res/drawable/img_arrow_down_8.xml | 9 --------- core/ui/src/main/res/drawable/img_arrow_up_8.xml | 9 --------- .../common/component/token/TokenFiatInfoBlock.kt | 11 +++++++---- 6 files changed, 33 insertions(+), 26 deletions(-) create mode 100644 core/ui/src/main/res/drawable/ic_arrow_down_8.xml create mode 100644 core/ui/src/main/res/drawable/ic_arrow_up_8.xml delete mode 100644 core/ui/src/main/res/drawable/img_arrow_down_8.xml delete mode 100644 core/ui/src/main/res/drawable/img_arrow_up_8.xml diff --git a/core/ui/src/main/java/com/tangem/core/ui/components/marketprice/MarketPriceBlock.kt b/core/ui/src/main/java/com/tangem/core/ui/components/marketprice/MarketPriceBlock.kt index f498b4caf7..61ae23802d 100644 --- a/core/ui/src/main/java/com/tangem/core/ui/components/marketprice/MarketPriceBlock.kt +++ b/core/ui/src/main/java/com/tangem/core/ui/components/marketprice/MarketPriceBlock.kt @@ -2,10 +2,10 @@ package com.tangem.core.ui.components.marketprice import androidx.compose.animation.AnimatedContent import androidx.compose.animation.ExperimentalAnimationApi -import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.layout.* import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.Icon import androidx.compose.material.Text import androidx.compose.runtime.* import androidx.compose.ui.Alignment @@ -136,13 +136,17 @@ private fun PriceChangeInPercent(config: PriceChangeConfig) { verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(space = TangemTheme.dimens.spacing4), ) { - Image( + Icon( painter = painterResource( id = when (type) { - PriceChangeConfig.Type.UP -> R.drawable.img_arrow_up_8 - PriceChangeConfig.Type.DOWN -> R.drawable.img_arrow_down_8 + PriceChangeConfig.Type.UP -> R.drawable.ic_arrow_up_8 + PriceChangeConfig.Type.DOWN -> R.drawable.ic_arrow_down_8 }, ), + tint = when (type) { + PriceChangeConfig.Type.UP -> TangemTheme.colors.icon.accent + PriceChangeConfig.Type.DOWN -> TangemTheme.colors.icon.warning + }, contentDescription = null, ) diff --git a/core/ui/src/main/res/drawable/ic_arrow_down_8.xml b/core/ui/src/main/res/drawable/ic_arrow_down_8.xml new file mode 100644 index 0000000000..94ff984c79 --- /dev/null +++ b/core/ui/src/main/res/drawable/ic_arrow_down_8.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/ui/src/main/res/drawable/ic_arrow_up_8.xml b/core/ui/src/main/res/drawable/ic_arrow_up_8.xml new file mode 100644 index 0000000000..0087a3703c --- /dev/null +++ b/core/ui/src/main/res/drawable/ic_arrow_up_8.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/ui/src/main/res/drawable/img_arrow_down_8.xml b/core/ui/src/main/res/drawable/img_arrow_down_8.xml deleted file mode 100644 index 355357c8c3..0000000000 --- a/core/ui/src/main/res/drawable/img_arrow_down_8.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/core/ui/src/main/res/drawable/img_arrow_up_8.xml b/core/ui/src/main/res/drawable/img_arrow_up_8.xml deleted file mode 100644 index 0d99c9d789..0000000000 --- a/core/ui/src/main/res/drawable/img_arrow_up_8.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/common/component/token/TokenFiatInfoBlock.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/common/component/token/TokenFiatInfoBlock.kt index ef5d0d5f72..d245ea512d 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/common/component/token/TokenFiatInfoBlock.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/common/component/token/TokenFiatInfoBlock.kt @@ -2,7 +2,6 @@ package com.tangem.feature.wallet.presentation.common.component.token import androidx.compose.animation.AnimatedContent import androidx.compose.animation.ExperimentalAnimationApi -import androidx.compose.foundation.Image import androidx.compose.foundation.layout.* import androidx.compose.material3.Icon import androidx.compose.material3.Text @@ -87,13 +86,17 @@ private fun PriceChangeIcon(type: PriceChangeConfig.Type, modifier: Modifier = M label = "Update the price change's arrow", modifier = modifier, ) { - Image( + Icon( painter = painterResource( id = when (it) { - PriceChangeConfig.Type.UP -> R.drawable.img_arrow_up_8 - PriceChangeConfig.Type.DOWN -> R.drawable.img_arrow_down_8 + PriceChangeConfig.Type.UP -> R.drawable.ic_arrow_up_8 + PriceChangeConfig.Type.DOWN -> R.drawable.ic_arrow_down_8 }, ), + tint = when (it) { + PriceChangeConfig.Type.UP -> TangemTheme.colors.icon.accent + PriceChangeConfig.Type.DOWN -> TangemTheme.colors.icon.warning + }, contentDescription = null, ) }