Merge pull request #1951 from Hafizzle/Fiz/choose-class-header-adjustments

Design header adjustments for "Choose Class"
This commit is contained in:
Phillip Thelen 2023-04-24 15:09:05 +02:00 committed by GitHub
commit d3779d35a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 2 deletions

View file

@ -58,4 +58,9 @@
<color name="widget_background">#2B203A</color>
<color name="text_gold">@color/yellow_100</color>
<color name="text_green10_green500">@color/green_500</color>
<color name="gray200_gray400">@color/gray_400</color>
<color name="gray700_gray10">@color/gray_10</color>
</resources>

View file

@ -125,4 +125,8 @@
<color name="error_banner_background">@color/maroon_5</color>
<color name="text_green1_green500">@color/green_1</color>
<color name="text_gold">@color/yellow_1</color>
<color name="text_green10_green500">@color/green_10</color>
<color name="gray200_gray400">@color/gray_200</color>
<color name="gray700_gray10">@color/gray_700</color>
</resources>

View file

@ -205,6 +205,17 @@ class HabiticaColors(
colorResource(if (hasIcon) R.color.content_background else R.color.content_background_offset)
}
}
@Composable
fun basicTextColor(): Color {
return colorResource(R.color.gray200_gray400)
}
@Composable
fun basicButtonColor(): Color {
return colorResource(R.color.gray700_gray10)
}
}
class HabiticaTypography {

View file

@ -177,7 +177,7 @@ fun AppHeaderView(
)
} else if (user?.preferences?.disableClasses != true && user?.flags?.classSelected == false) {
HabiticaButton(
background = MaterialTheme.colors.primarySurface,
background = HabiticaTheme.colors.basicButtonColor(),
color = MaterialTheme.colors.onPrimary,
onClick = {
MainNavigationController.navigate(R.id.classSelectionActivity)
@ -186,7 +186,10 @@ fun AppHeaderView(
fontSize = 14.sp,
modifier = Modifier.height(28.dp)
) {
Text(stringResource(R.string.choose_class))
Text(
text = stringResource(R.string.choose_class),
color = HabiticaTheme.colors.basicTextColor()
)
}
} else {
Spacer(modifier = Modifier.weight(1f))