mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-13 17:51:57 +00:00
Merge pull request #1951 from Hafizzle/Fiz/choose-class-header-adjustments
Design header adjustments for "Choose Class"
This commit is contained in:
commit
d3779d35a5
4 changed files with 25 additions and 2 deletions
|
|
@ -58,4 +58,9 @@
|
||||||
|
|
||||||
<color name="widget_background">#2B203A</color>
|
<color name="widget_background">#2B203A</color>
|
||||||
<color name="text_gold">@color/yellow_100</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>
|
</resources>
|
||||||
|
|
|
||||||
|
|
@ -125,4 +125,8 @@
|
||||||
<color name="error_banner_background">@color/maroon_5</color>
|
<color name="error_banner_background">@color/maroon_5</color>
|
||||||
<color name="text_green1_green500">@color/green_1</color>
|
<color name="text_green1_green500">@color/green_1</color>
|
||||||
<color name="text_gold">@color/yellow_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>
|
</resources>
|
||||||
|
|
|
||||||
|
|
@ -205,6 +205,17 @@ class HabiticaColors(
|
||||||
colorResource(if (hasIcon) R.color.content_background else R.color.content_background_offset)
|
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 {
|
class HabiticaTypography {
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ fun AppHeaderView(
|
||||||
)
|
)
|
||||||
} else if (user?.preferences?.disableClasses != true && user?.flags?.classSelected == false) {
|
} else if (user?.preferences?.disableClasses != true && user?.flags?.classSelected == false) {
|
||||||
HabiticaButton(
|
HabiticaButton(
|
||||||
background = MaterialTheme.colors.primarySurface,
|
background = HabiticaTheme.colors.basicButtonColor(),
|
||||||
color = MaterialTheme.colors.onPrimary,
|
color = MaterialTheme.colors.onPrimary,
|
||||||
onClick = {
|
onClick = {
|
||||||
MainNavigationController.navigate(R.id.classSelectionActivity)
|
MainNavigationController.navigate(R.id.classSelectionActivity)
|
||||||
|
|
@ -186,7 +186,10 @@ fun AppHeaderView(
|
||||||
fontSize = 14.sp,
|
fontSize = 14.sp,
|
||||||
modifier = Modifier.height(28.dp)
|
modifier = Modifier.height(28.dp)
|
||||||
) {
|
) {
|
||||||
Text(stringResource(R.string.choose_class))
|
Text(
|
||||||
|
text = stringResource(R.string.choose_class),
|
||||||
|
color = HabiticaTheme.colors.basicTextColor()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue