mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 15:29:15 +01:00
ui: let the third bio line use the full width
Only reserve the action-button width for the lines they actually overlap, so the collapsed bio's More stays on the third full-width line without moving the actions or spacing.
This commit is contained in:
@@ -570,8 +570,7 @@ fun ArtistDetailScreen(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The collapsed layout narrows all three lines so the More control stays clear of the action
|
// Only the lines that overlap the action buttons are narrowed; later lines use the full width.
|
||||||
// buttons. Expanded lines only reserve the rows the buttons actually overlap.
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun ArtistBio(
|
private fun ArtistBio(
|
||||||
text: String,
|
text: String,
|
||||||
@@ -602,14 +601,12 @@ private fun ArtistBio(
|
|||||||
ceil(with(density) { (BIO_ACTION_HEIGHT - BIO_ACTION_OFFSET).toPx() } / lineHeightPx)
|
ceil(with(density) { (BIO_ACTION_HEIGHT - BIO_ACTION_OFFSET).toPx() } / lineHeightPx)
|
||||||
.toInt()
|
.toInt()
|
||||||
.coerceAtLeast(1)
|
.coerceAtLeast(1)
|
||||||
val collapsedReserveLines = maxOf(reserveLines, 3)
|
|
||||||
val bioLines =
|
val bioLines =
|
||||||
remember(
|
remember(
|
||||||
text,
|
text,
|
||||||
fullWidth,
|
fullWidth,
|
||||||
reserve,
|
reserve,
|
||||||
reserveLines,
|
reserveLines,
|
||||||
collapsedReserveLines,
|
|
||||||
collapsed,
|
collapsed,
|
||||||
expanded,
|
expanded,
|
||||||
moreText,
|
moreText,
|
||||||
@@ -623,7 +620,7 @@ private fun ArtistBio(
|
|||||||
style,
|
style,
|
||||||
fullWidth,
|
fullWidth,
|
||||||
reserve,
|
reserve,
|
||||||
collapsedReserveLines,
|
reserveLines,
|
||||||
moreText,
|
moreText,
|
||||||
maxLines = 3,
|
maxLines = 3,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user