mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-16 23:12:12 +00:00
fix: adjust poster card shape for homecollectionrow
This commit is contained in:
parent
e373759de7
commit
21963d35cc
1 changed files with 6 additions and 5 deletions
|
|
@ -1,6 +1,5 @@
|
|||
package com.nuvio.app.features.home.components
|
||||
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.BoxWithConstraints
|
||||
|
|
@ -26,6 +25,7 @@ import androidx.compose.ui.unit.dp
|
|||
import androidx.compose.ui.unit.sp
|
||||
import com.nuvio.app.core.ui.NuvioShelfSection
|
||||
import com.nuvio.app.core.ui.PosterLandscapeAspectRatio
|
||||
import com.nuvio.app.core.ui.landscapePosterWidth
|
||||
import com.nuvio.app.core.ui.posterCardClickable
|
||||
import com.nuvio.app.core.ui.rememberPosterCardStyleUiState
|
||||
import com.nuvio.app.features.collection.Collection
|
||||
|
|
@ -89,21 +89,22 @@ private fun CollectionFolderCard(
|
|||
onClick: (() -> Unit)? = null,
|
||||
) {
|
||||
val posterCardStyle = rememberPosterCardStyleUiState()
|
||||
val shape = folder.posterShape
|
||||
val isLandscapeMode = posterCardStyle.catalogLandscapeModeEnabled
|
||||
val shape = if (isLandscapeMode) PosterShape.Landscape else folder.posterShape
|
||||
val cardWidth: Dp
|
||||
val aspectRatio: Float
|
||||
|
||||
when (shape) {
|
||||
PosterShape.Poster -> {
|
||||
cardWidth = 110.dp
|
||||
cardWidth = posterCardStyle.widthDp.dp
|
||||
aspectRatio = 0.675f
|
||||
}
|
||||
PosterShape.Landscape -> {
|
||||
cardWidth = 180.dp
|
||||
cardWidth = landscapePosterWidth(posterCardStyle.widthDp)
|
||||
aspectRatio = PosterLandscapeAspectRatio
|
||||
}
|
||||
PosterShape.Square -> {
|
||||
cardWidth = 120.dp
|
||||
cardWidth = posterCardStyle.widthDp.dp
|
||||
aspectRatio = 1f
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue