diff --git a/app/src/main/java/com/example/labwork/pages/ListProduct.kt b/app/src/main/java/com/example/labwork/pages/ListProduct.kt index 2c77304..2c9e464 100644 --- a/app/src/main/java/com/example/labwork/pages/ListProduct.kt +++ b/app/src/main/java/com/example/labwork/pages/ListProduct.kt @@ -61,26 +61,62 @@ fun ListProduct(item: ItemProduct) { contentScale = ContentScale.Crop, modifier = Modifier .padding(10.dp) - .size(94.dp) + .size(128.dp) .shadow(2.dp) ) Button( colors = ButtonDefaults.buttonColors(backgroundColor = LightBluePolitech), modifier = Modifier .padding(start = 9.dp, bottom = 9.dp) - .size(height = 32.dp, width = 95.dp), + .size(height = 32.dp, width = 128.dp), onClick = { isFullAbout = !isFullAbout }, shape = RoundedCornerShape(15.dp) ) { Text( - text = "Подробнее", + text = if(isFullAbout) "Убрать" else "Подробнее", color = Color.White, fontSize = 10.sp, textAlign = TextAlign.Center, ) } + Row { + Button( + colors = ButtonDefaults.buttonColors(backgroundColor = LightBluePolitech), + modifier = Modifier + .padding(start = 9.dp, bottom = 9.dp) + .size(height = 32.dp, width = 40.dp), + onClick = { + isFullAbout = !isFullAbout + }, + shape = RoundedCornerShape(15.dp) + ) { + Text( + text = "+", + color = Color.White, + fontSize = 10.sp, + textAlign = TextAlign.Center, + ) + } + Button( + colors = ButtonDefaults.buttonColors(backgroundColor = LightBluePolitech), + modifier = Modifier + .padding(start = 9.dp, bottom = 9.dp) + .size(height = 32.dp, width = 40.dp), + onClick = { + isFullAbout = !isFullAbout + }, + shape = RoundedCornerShape(15.dp) + ) { + Text( + text = "-", + color = Color.White, + fontSize = 10.sp, + textAlign = TextAlign.Center, + ) + } + } } Column { Text( @@ -89,7 +125,9 @@ fun ListProduct(item: ItemProduct) { fontSize = textSize.value.sp, fontWeight = FontWeight.Bold, textAlign = TextAlign.Center, - modifier = Modifier.fillMaxWidth().padding(top = 8.dp) + modifier = Modifier + .fillMaxWidth() + .padding(top = 8.dp) ) AnimatedVisibility( visible = isFullAbout, @@ -103,7 +141,9 @@ fun ListProduct(item: ItemProduct) { maxLines = 10, fontSize = 14.sp, textAlign = TextAlign.Center, - modifier = Modifier.fillMaxWidth().padding(bottom = 8.dp) + modifier = Modifier + .fillMaxWidth() + .padding(bottom = 8.dp) ) } }