Skip to content

Commit

Permalink
World trait rating colors for all, but geysers only warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanOltmann committed Oct 13, 2024
1 parent 4b332d8 commit 0e8202b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
3 changes: 1 addition & 2 deletions app/src/commonMain/kotlin/model/Rating.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
package model

import androidx.compose.ui.graphics.Color
import ui.theme.anthracite

enum class Rating(
val value: Int,
Expand All @@ -39,7 +38,7 @@ enum class Rating(

NEUTRAL(
value = 0,
color = anthracite
color = Color.Transparent
),

BAD(
Expand Down
10 changes: 6 additions & 4 deletions app/src/commonMain/kotlin/ui/AsteroidDisplay.kt
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,12 @@ fun AsteroidView(
contentAlignment = Alignment.Center,
modifier = Modifier
.background(
if (worldTrait.rating.isNegative())
worldTrait.rating.color.copy(alpha = 0.3f)
else
anthraticeTransparentBackgroundColor,
anthraticeTransparentBackgroundColor,
minimalRoundedCornerShape
)
.border(
2.dp,
worldTrait.rating.color,
minimalRoundedCornerShape
)
.size(24.dp)
Expand Down
8 changes: 2 additions & 6 deletions app/src/commonMain/kotlin/ui/WolrdTraitDetail.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import org.jetbrains.compose.resources.painterResource
import ui.theme.cardColorBackground
import ui.theme.defaultRoundedCornerShape
import ui.theme.doubleSpacing
import ui.theme.lightGrayTransparentBorderColor

@Composable
fun WorlTraitDetail(
Expand All @@ -48,15 +47,12 @@ fun WorlTraitDetail(
horizontal = doubleSpacing
)
.background(
if (worldTrait.rating.isNegative())
worldTrait.rating.color.copy(alpha = 0.3f)
else
cardColorBackground,
defaultRoundedCornerShape
)
.border(
0.dp,
lightGrayTransparentBorderColor,
2.dp,
worldTrait.rating.color,
defaultRoundedCornerShape
)
.fillMaxWidth()
Expand Down

0 comments on commit 0e8202b

Please sign in to comment.