mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 10:05:15 +00:00
Clipping content
This commit is contained in:
parent
4dd84331de
commit
356b105b98
@ -30,6 +30,7 @@ import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Surface
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
@ -37,6 +38,7 @@ import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.res.painterResource
|
||||
@ -284,7 +286,10 @@ private fun CarouselPager(
|
||||
attachments: List<Attachment>,
|
||||
onClick: (Int) -> Unit
|
||||
) {
|
||||
Cell {
|
||||
Cell(
|
||||
modifier = Modifier
|
||||
.clip(MaterialTheme.shapes.small)
|
||||
) {
|
||||
HorizontalPager(state = pagerState) { i ->
|
||||
GlideImage(
|
||||
contentScale = ContentScale.Crop,
|
||||
|
@ -258,12 +258,13 @@ fun PrewviewItemButton() {
|
||||
|
||||
@Composable
|
||||
fun Cell(
|
||||
modifier: Modifier = Modifier,
|
||||
padding: PaddingValues = PaddingValues(all = 0.dp),
|
||||
margin: PaddingValues = PaddingValues(all = 0.dp),
|
||||
content: @Composable () -> Unit
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
modifier = modifier
|
||||
.padding(margin)
|
||||
.background(
|
||||
color = LocalColors.current.backgroundSecondary,
|
||||
|
Loading…
Reference in New Issue
Block a user