50 shades of green

- Now using a more saturated green
- Digit buttons are now grayish
- Background color is not a tint anymore: only white, dark gray and black. This change doesn't apply to dynamic themes.
This commit is contained in:
Sad Ellie 2022-12-09 20:29:15 +04:00
parent c82450af8a
commit f923847f72
6 changed files with 11 additions and 10 deletions

View File

@ -41,7 +41,8 @@ import com.sadellie.unitto.ui.theme.NumbersTextStyleTitleLarge
*
* @param modifier Modifier that is applied to a [Button] component.
* @param digit Symbol to show on button.
* @param isPrimary If true will use `inverseOnSurface` color, else `secondaryContainer`.
* @param isPrimary If true will use `inverseOnSurface` color, else `secondaryContainer`. Primary
* buttons are digits.
* @param onLongClick Action to perform when holding this button.
* @param onClick Action to perform when clicking this button.
*/
@ -65,7 +66,7 @@ fun KeyboardButton(
interactionSource = interactionSource,
shape = RoundedCornerShape(cornerRadius),
colors = ButtonDefaults.buttonColors(
containerColor = if (isPrimary) MaterialTheme.colorScheme.surfaceVariant else MaterialTheme.colorScheme.secondaryContainer,
containerColor = if (isPrimary) MaterialTheme.colorScheme.inverseOnSurface else MaterialTheme.colorScheme.primaryContainer,
contentColor = MaterialTheme.colorScheme.onSecondaryContainer,
disabledContentColor = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.3f)
),

View File

@ -57,7 +57,7 @@ fun UnitSelectionButton(
onClick = { onClick() },
enabled = !isLoading,
colors = ButtonDefaults.buttonColors(
containerColor = MaterialTheme.colorScheme.secondaryContainer
containerColor = MaterialTheme.colorScheme.primaryContainer
),
contentPadding = PaddingValues(vertical = 16.dp, horizontal = 8.dp)
) {

View File

@ -139,7 +139,7 @@ private fun UnittoFilterChip(
.height(32.dp)
.clip(chipShape)
.background(
if (isSelected) MaterialTheme.colorScheme.secondaryContainer else Color.Transparent
if (isSelected) MaterialTheme.colorScheme.primaryContainer else Color.Transparent
)
// Remove border when selected
.border(

View File

@ -88,7 +88,7 @@ private fun BasicUnitListItem(
Row(
modifier = Modifier
.background(
if (isSelected) MaterialTheme.colorScheme.secondaryContainer else Color.Transparent,
if (isSelected) MaterialTheme.colorScheme.primaryContainer else Color.Transparent,
RoundedCornerShape(24.dp)
).padding(paddingValues = PaddingValues(horizontal = 12.dp, vertical = 8.dp))
.fillMaxWidth(),

View File

@ -88,7 +88,7 @@ fun UnitGroupsScreen(
ReorderableItem(state, key = item) { isDragging ->
val transition = updateTransition(isDragging, label = "draggedTransition")
val background by transition.animateColor(label = "background") {
if (it) MaterialTheme.colorScheme.secondaryContainer else MaterialTheme.colorScheme.surface
if (it) MaterialTheme.colorScheme.primaryContainer else MaterialTheme.colorScheme.surface
}
val itemPadding by transition.animateDp(label = "itemPadding") {
if (it) 16.dp else 0.dp

View File

@ -36,9 +36,9 @@ val md_theme_light_error = Color(0xFFba1b1b)
val md_theme_light_errorContainer = Color(0xFFffdad4)
val md_theme_light_onError = Color(0xFFffffff)
val md_theme_light_onErrorContainer = Color(0xFF410001)
val md_theme_light_background = Color(0xFFfcfcf7)
val md_theme_light_background = Color(0xFFffffff)
val md_theme_light_onBackground = Color(0xFF1a1c19)
val md_theme_light_surface = Color(0xFFfcfcf7)
val md_theme_light_surface = Color(0xFFffffff)
val md_theme_light_onSurface = Color(0xFF1a1c19)
val md_theme_light_surfaceVariant = Color(0xFFdde5d9)
val md_theme_light_onSurfaceVariant = Color(0xFF414940)
@ -63,9 +63,9 @@ val md_theme_dark_error = Color(0xFFffb4a9)
val md_theme_dark_errorContainer = Color(0xFF930006)
val md_theme_dark_onError = Color(0xFF680003)
val md_theme_dark_onErrorContainer = Color(0xFFffdad4)
val md_theme_dark_background = Color(0xFF1a1c19)
val md_theme_dark_background = Color(0xFF161616)
val md_theme_dark_onBackground = Color(0xFFe1e3dd)
val md_theme_dark_surface = Color(0xFF1a1c19)
val md_theme_dark_surface = Color(0xFF161616)
val md_theme_dark_onSurface = Color(0xFFe1e3dd)
val md_theme_dark_surfaceVariant = Color(0xFF414940)
val md_theme_dark_onSurfaceVariant = Color(0xFFc1c9be)