Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add circular clipping for coin images #7519

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package io.horizontalsystems.bankwallet.modules.coin.ui

import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
Expand All @@ -28,7 +30,7 @@ fun CoinScreenTitle(
url = coinIconUrl,
alternativeUrl = alternativeCoinIconUrl,
placeholder = iconPlaceholder,
modifier = Modifier.size(32.dp)
modifier = Modifier.size(32.dp).clip(CircleShape)
)

body_grey(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Divider
import androidx.compose.material.Icon
Expand Down Expand Up @@ -181,6 +182,7 @@ private fun CoinCell(
modifier = Modifier
.padding(end = 16.dp, top = 12.dp, bottom = 12.dp)
.size(32.dp)
.clip(CircleShape)
)
Column(
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.Divider
import androidx.compose.material.Icon
import androidx.compose.runtime.Composable
Expand All @@ -29,6 +30,7 @@ import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
Expand Down Expand Up @@ -268,6 +270,7 @@ private fun MarketCoin(
modifier = Modifier
.padding(end = 16.dp)
.size(32.dp)
.clip(CircleShape)
)
Column(
modifier = Modifier.weight(1f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package io.horizontalsystems.bankwallet.ui.compose.components

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -55,7 +56,7 @@ fun CoinImage(
url = coin?.imageUrl,
alternativeUrl = coin?.alternativeImageUrl,
placeholder = coin?.imagePlaceholder,
modifier = modifier,
modifier = modifier.clip(CircleShape),
colorFilter = colorFilter
)

Expand All @@ -68,7 +69,7 @@ fun CoinImage(
url = token?.coin?.imageUrl,
alternativeUrl = token?.coin?.alternativeImageUrl,
placeholder = token?.iconPlaceholder,
modifier = modifier,
modifier = modifier.clip(CircleShape),
colorFilter = colorFilter
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
Expand Down Expand Up @@ -98,6 +99,7 @@ fun MarketCoin(
modifier = Modifier
.padding(end = 16.dp)
.size(32.dp)
.clip(CircleShape)
)
Column(
modifier = Modifier.fillMaxWidth()
Expand Down
Loading