Design header adjustments for "Choose Class"

Dark mode: button is Gray10, text is Gray400
Light mode: button is Gray 700, text is Gray200
This commit is contained in:
Hafiz 2023-04-04 09:31:39 -04:00
parent 7bca210864
commit 25d07d0ce9
4 changed files with 25 additions and 4 deletions

View file

@ -51,11 +51,15 @@
<color name="text_brand_white">@color/white</color>
<color name="text_red_maroon">@color/red_100</color>
<color name="lightly_tinted_background">@color/brand_50</color>
<color name="text_green10_green500">@color/green_500</color>
<color name="dialog_background">@color/gray_10</color>
<color name="armoire_text">@color/gray_400</color>
<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

@ -123,6 +123,9 @@
<color name="lightly_tinted_background">@color/brand_700</color>
<color name="dialog_background">@color/white</color>
<color name="error_banner_background">@color/maroon_5</color>
<color name="text_green10_green500">@color/green_10</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))