mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 19:57:04 +05:30
common: don't hardcode circle clip in NetworkImage
This commit is contained in:
parent
a3520c818b
commit
3fe304dedd
2 changed files with 4 additions and 3 deletions
|
@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
|||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
|
@ -24,6 +25,7 @@ import androidx.compose.runtime.mutableStateOf
|
|||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.platform.LocalUriHandler
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
@ -107,6 +109,7 @@ fun PostLink(
|
|||
painter = ClawIcons.Web,
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colorScheme.onSecondary,
|
||||
modifier = Modifier.clip(CircleShape),
|
||||
)
|
||||
}
|
||||
Text(
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package dev.msfjarvis.claw.common.ui
|
||||
|
||||
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.graphics.painter.Painter
|
||||
import coil.compose.AsyncImage
|
||||
|
||||
|
@ -20,6 +18,6 @@ fun NetworkImage(
|
|||
error = placeholder,
|
||||
fallback = placeholder,
|
||||
contentDescription = contentDescription,
|
||||
modifier = modifier.clip(CircleShape)
|
||||
modifier = modifier,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue