Skip to content

Commit 31c6c01

Browse files
committed
🔧 updated lyrics customisation page ui
1 parent d377b1e commit 31c6c01

File tree

6 files changed

+245
-163
lines changed

6 files changed

+245
-163
lines changed

app/src/main/java/com/shub39/rush/presentation/ListItemExt.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ private const val endCornerRadius = 16
2929

3030
@Composable
3131
fun listItemColors(): ListItemColors {
32-
return ListItemDefaults.colors(containerColor = MaterialTheme.colorScheme.surfaceContainerHigh)
32+
return ListItemDefaults.colors(containerColor = MaterialTheme.colorScheme.surfaceContainerHighest)
3333
}
3434

3535
fun leadingItemShape(): Shape =
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package com.shub39.rush.presentation.components
2+
3+
import androidx.compose.foundation.layout.Column
4+
import androidx.compose.foundation.layout.ColumnScope
5+
import androidx.compose.foundation.layout.padding
6+
import androidx.compose.foundation.shape.RoundedCornerShape
7+
import androidx.compose.material3.Card
8+
import androidx.compose.material3.CardColors
9+
import androidx.compose.material3.CardDefaults
10+
import androidx.compose.runtime.Composable
11+
import androidx.compose.ui.Modifier
12+
import androidx.compose.ui.graphics.Shape
13+
import androidx.compose.ui.unit.dp
14+
15+
@Composable
16+
fun ListItemCard(
17+
modifier: Modifier = Modifier,
18+
shape: Shape = RoundedCornerShape(4.dp),
19+
colors: CardColors = CardDefaults.cardColors(),
20+
content: @Composable (ColumnScope.() -> Unit)
21+
) {
22+
Card(
23+
modifier = modifier,
24+
shape = shape,
25+
colors = colors,
26+
) {
27+
Column(
28+
modifier = Modifier.padding(16.dp),
29+
content = content
30+
)
31+
}
32+
}

app/src/main/java/com/shub39/rush/presentation/components/ListSelect.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,21 @@ fun <T> ListSelect(
5757
) {
5858
Column(
5959
modifier = modifier.fillMaxWidth(),
60-
horizontalAlignment = Alignment.CenterHorizontally,
6160
verticalArrangement = Arrangement.spacedBy(8.dp),
6261
) {
6362
Text(
6463
text = title,
65-
style = MaterialTheme.typography.titleLarge,
66-
textAlign = TextAlign.Center,
64+
style = MaterialTheme.typography.titleMedium,
6765
)
6866

69-
FlowRow(horizontalArrangement = Arrangement.Center) {
67+
FlowRow {
7068
options.forEach { option ->
7169
ToggleButton(
7270
checked = option == selected,
7371
onCheckedChange = { onSelectedChange(option) },
7472
content = { labelProvider(option) },
7573
colors = ToggleButtonDefaults.tonalToggleButtonColors(),
76-
modifier = Modifier.padding(horizontal = 4.dp),
74+
modifier = Modifier.padding(horizontal = 2.dp),
7775
)
7876
}
7977
}

0 commit comments

Comments
 (0)