Re-arrange components so as to better fit the ListOptionsButton.
This commit is contained in:
+43
-41
@@ -54,7 +54,6 @@ import androidx.compose.runtime.getValue
|
|||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.runtime.rememberCoroutineScope
|
import androidx.compose.runtime.rememberCoroutineScope
|
||||||
import androidx.compose.runtime.setValue
|
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
@@ -315,46 +314,48 @@ fun CustomListItem(
|
|||||||
width = Dp.Hairline,
|
width = Dp.Hairline,
|
||||||
color = Color.Gray,
|
color = Color.Gray,
|
||||||
shape = RoundedCornerShape(percent = 20),
|
shape = RoundedCornerShape(percent = 20),
|
||||||
).padding(all = 12.dp),
|
).padding(horizontal = 10.dp),
|
||||||
// verticalAlignment = Alignment.CenterVertically,
|
|
||||||
) {
|
) {
|
||||||
Column(
|
Row(
|
||||||
modifier = modifier.weight(1f),
|
modifier =
|
||||||
verticalArrangement = Arrangement.Center,
|
modifier
|
||||||
|
.padding(bottom = 12.dp)
|
||||||
|
.weight(1f),
|
||||||
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
Row(
|
Column(
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
modifier = modifier.weight(1f),
|
||||||
|
verticalArrangement = Arrangement.Center,
|
||||||
) {
|
) {
|
||||||
Text(followSet.title, fontWeight = FontWeight.Bold)
|
Row(
|
||||||
Spacer(modifier = StdHorzSpacer)
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
FilterChip(
|
) {
|
||||||
selected = true,
|
Text(followSet.title, fontWeight = FontWeight.Bold)
|
||||||
onClick = {},
|
Spacer(modifier = StdHorzSpacer)
|
||||||
label = {
|
FilterChip(
|
||||||
Text(text = "${followSet.profileList.size}")
|
selected = true,
|
||||||
},
|
onClick = {},
|
||||||
leadingIcon = {
|
label = {
|
||||||
Icon(
|
Text(text = "${followSet.profileList.size}")
|
||||||
imageVector = Icons.Default.People,
|
},
|
||||||
contentDescription = null,
|
leadingIcon = {
|
||||||
)
|
Icon(
|
||||||
},
|
imageVector = Icons.Default.People,
|
||||||
shape = ButtonBorder,
|
contentDescription = null,
|
||||||
|
)
|
||||||
|
},
|
||||||
|
shape = ButtonBorder,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
Spacer(modifier = StdVertSpacer)
|
||||||
|
Text(
|
||||||
|
followSet.description ?: "",
|
||||||
|
fontWeight = FontWeight.Light,
|
||||||
|
overflow = TextOverflow.Ellipsis,
|
||||||
|
maxLines = 2,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Spacer(modifier = StdVertSpacer)
|
|
||||||
Text(
|
|
||||||
followSet.description ?: "",
|
|
||||||
fontWeight = FontWeight.Light,
|
|
||||||
overflow = TextOverflow.Ellipsis,
|
|
||||||
maxLines = 3,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
Row(
|
|
||||||
verticalAlignment = Alignment.Top,
|
|
||||||
horizontalArrangement = Arrangement.End,
|
|
||||||
) {
|
|
||||||
followSet.visibility.let {
|
followSet.visibility.let {
|
||||||
val text by derivedStateOf {
|
val text by derivedStateOf {
|
||||||
when (it) {
|
when (it) {
|
||||||
@@ -382,13 +383,14 @@ fun CustomListItem(
|
|||||||
Text(text, color = Color.Gray, fontWeight = FontWeight.Light)
|
Text(text, color = Color.Gray, fontWeight = FontWeight.Light)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
verticalArrangement = Arrangement.Top,
|
modifier = modifier.padding(vertical = 7.dp),
|
||||||
horizontalAlignment = Alignment.End,
|
verticalArrangement = Arrangement.Top,
|
||||||
) {
|
horizontalAlignment = Alignment.End,
|
||||||
ListOptionsButton(followSetName = followSet.title)
|
) {
|
||||||
}
|
ListOptionsButton(followSetName = followSet.title)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user