Skip to content

Commit

Permalink
Replace unneeded Default.copy for creating a TextStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisCAD committed Feb 23, 2024
1 parent 26722fa commit 39c538f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion shared/src/main/kotlin/ComposeOClockWatermark.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fun ComposeOClockWatermark(finalBrush: Brush) {
value = if (result.isSuccess) finalBrush else Brush.linearGradient(listOf(Color.Red))
}
val interactiveTextStyle = remember(fontFamily, brush) {
TextStyle.Default.copy(
TextStyle(
brush = brush,
fontFamily = fontFamily,
fontSize = 16.sp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fun TextOnPathExperiment(finalBrush: Brush) {
value = if (result.isSuccess) finalBrush else Brush.linearGradient(listOf(Color.Red))
}
val textStyle = remember(fontFamily, brush) {
TextStyle.Default.copy(
TextStyle(
brush = null,
fontFamily = fontFamily,
fontSize = 16.sp,
Expand Down
6 changes: 3 additions & 3 deletions shared/src/main/kotlin/watchfaces/hansie/HansieClock.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private fun HansieBackground() {
@Composable
private fun HansieHoursHand(locale: Locale) {
val style = remember {
TextStyle.Default.copy(
TextStyle(
fontSize = 26.sp,
fontWeight = FontWeight.W600,
color = Color.White
Expand All @@ -62,7 +62,7 @@ private fun HansieHoursHand(locale: Locale) {
@Composable
private fun HansieMinutesHand(locale: Locale) {
val style = remember {
TextStyle.Default.copy(
TextStyle(
fontSize = 26.sp,
fontWeight = FontWeight.W400,
color = Color.DarkGray.copy(alpha = 0.8f),
Expand All @@ -79,7 +79,7 @@ private fun HansieMinutesHand(locale: Locale) {
@Composable
private fun HansieSecondsHand(locale: Locale) {
val style = remember {
TextStyle.Default.copy(
TextStyle(
fontSize = 14.sp,
fontWeight = FontWeight.W200,
color = Color.LightGray.copy(alpha = 0.6f),
Expand Down

0 comments on commit 39c538f

Please sign in to comment.