Skip to content

Commit 9e905d8

Browse files
committed
Styling
1 parent 04fa772 commit 9e905d8

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

app/src/main/java/com/peterfarlow/NewGamePlayerListScreen.kt

+7-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import androidx.compose.ui.res.stringResource
2525
import androidx.compose.ui.text.AnnotatedString
2626
import androidx.compose.ui.text.TextStyle
2727
import androidx.compose.ui.unit.dp
28+
import androidx.compose.ui.unit.sp
2829
import androidx.lifecycle.Lifecycle
2930
import androidx.lifecycle.SavedStateHandle
3031
import androidx.lifecycle.ViewModel
@@ -84,7 +85,11 @@ fun PlayerCard(player: Player, onClick: (Player) -> Unit) {
8485
) {
8586
ClickableText(
8687
text = AnnotatedString(player.name),
87-
style = TextStyle(color = contentColorFor(backgroundColor)),
88+
modifier = Modifier.padding(16.dp),
89+
style = TextStyle(
90+
color = contentColorFor(backgroundColor),
91+
fontSize = 16.sp
92+
),
8893
onClick = { onClick(player) }
8994
)
9095
}
@@ -93,7 +98,7 @@ fun PlayerCard(player: Player, onClick: (Player) -> Unit) {
9398
fun TokenColor.asComposeColor(): Color = when (this) {
9499
TokenColor.RED -> Color.Red
95100
TokenColor.BLUE -> Color.Blue
96-
TokenColor.PURPLE -> Color(purple)
101+
TokenColor.PURPLE -> Color(PURPLE)
97102
TokenColor.GREEN -> Color.Green
98103
TokenColor.YELLOW -> Color.Yellow
99104
}

app/src/main/java/com/peterfarlow/Theme.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import androidx.compose.runtime.Composable
99
private val DarkColors = darkColors()
1010
private val LightColors = lightColors()
1111

12-
const val purple = 0xff8e24aa
12+
const val PURPLE = 0xff8e24aa
1313

1414
@Composable
1515
fun WingspanTheme(

0 commit comments

Comments
 (0)