mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 00:35:26 +02:00
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:
parent
c82450af8a
commit
f923847f72
@ -41,7 +41,8 @@ import com.sadellie.unitto.ui.theme.NumbersTextStyleTitleLarge
|
|||||||
*
|
*
|
||||||
* @param modifier Modifier that is applied to a [Button] component.
|
* @param modifier Modifier that is applied to a [Button] component.
|
||||||
* @param digit Symbol to show on button.
|
* @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 onLongClick Action to perform when holding this button.
|
||||||
* @param onClick Action to perform when clicking this button.
|
* @param onClick Action to perform when clicking this button.
|
||||||
*/
|
*/
|
||||||
@ -65,7 +66,7 @@ fun KeyboardButton(
|
|||||||
interactionSource = interactionSource,
|
interactionSource = interactionSource,
|
||||||
shape = RoundedCornerShape(cornerRadius),
|
shape = RoundedCornerShape(cornerRadius),
|
||||||
colors = ButtonDefaults.buttonColors(
|
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,
|
contentColor = MaterialTheme.colorScheme.onSecondaryContainer,
|
||||||
disabledContentColor = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.3f)
|
disabledContentColor = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.3f)
|
||||||
),
|
),
|
||||||
|
@ -57,7 +57,7 @@ fun UnitSelectionButton(
|
|||||||
onClick = { onClick() },
|
onClick = { onClick() },
|
||||||
enabled = !isLoading,
|
enabled = !isLoading,
|
||||||
colors = ButtonDefaults.buttonColors(
|
colors = ButtonDefaults.buttonColors(
|
||||||
containerColor = MaterialTheme.colorScheme.secondaryContainer
|
containerColor = MaterialTheme.colorScheme.primaryContainer
|
||||||
),
|
),
|
||||||
contentPadding = PaddingValues(vertical = 16.dp, horizontal = 8.dp)
|
contentPadding = PaddingValues(vertical = 16.dp, horizontal = 8.dp)
|
||||||
) {
|
) {
|
||||||
|
@ -139,7 +139,7 @@ private fun UnittoFilterChip(
|
|||||||
.height(32.dp)
|
.height(32.dp)
|
||||||
.clip(chipShape)
|
.clip(chipShape)
|
||||||
.background(
|
.background(
|
||||||
if (isSelected) MaterialTheme.colorScheme.secondaryContainer else Color.Transparent
|
if (isSelected) MaterialTheme.colorScheme.primaryContainer else Color.Transparent
|
||||||
)
|
)
|
||||||
// Remove border when selected
|
// Remove border when selected
|
||||||
.border(
|
.border(
|
||||||
|
@ -88,7 +88,7 @@ private fun BasicUnitListItem(
|
|||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.background(
|
.background(
|
||||||
if (isSelected) MaterialTheme.colorScheme.secondaryContainer else Color.Transparent,
|
if (isSelected) MaterialTheme.colorScheme.primaryContainer else Color.Transparent,
|
||||||
RoundedCornerShape(24.dp)
|
RoundedCornerShape(24.dp)
|
||||||
).padding(paddingValues = PaddingValues(horizontal = 12.dp, vertical = 8.dp))
|
).padding(paddingValues = PaddingValues(horizontal = 12.dp, vertical = 8.dp))
|
||||||
.fillMaxWidth(),
|
.fillMaxWidth(),
|
||||||
|
@ -88,7 +88,7 @@ fun UnitGroupsScreen(
|
|||||||
ReorderableItem(state, key = item) { isDragging ->
|
ReorderableItem(state, key = item) { isDragging ->
|
||||||
val transition = updateTransition(isDragging, label = "draggedTransition")
|
val transition = updateTransition(isDragging, label = "draggedTransition")
|
||||||
val background by transition.animateColor(label = "background") {
|
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") {
|
val itemPadding by transition.animateDp(label = "itemPadding") {
|
||||||
if (it) 16.dp else 0.dp
|
if (it) 16.dp else 0.dp
|
||||||
|
@ -36,9 +36,9 @@ val md_theme_light_error = Color(0xFFba1b1b)
|
|||||||
val md_theme_light_errorContainer = Color(0xFFffdad4)
|
val md_theme_light_errorContainer = Color(0xFFffdad4)
|
||||||
val md_theme_light_onError = Color(0xFFffffff)
|
val md_theme_light_onError = Color(0xFFffffff)
|
||||||
val md_theme_light_onErrorContainer = Color(0xFF410001)
|
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_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_onSurface = Color(0xFF1a1c19)
|
||||||
val md_theme_light_surfaceVariant = Color(0xFFdde5d9)
|
val md_theme_light_surfaceVariant = Color(0xFFdde5d9)
|
||||||
val md_theme_light_onSurfaceVariant = Color(0xFF414940)
|
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_errorContainer = Color(0xFF930006)
|
||||||
val md_theme_dark_onError = Color(0xFF680003)
|
val md_theme_dark_onError = Color(0xFF680003)
|
||||||
val md_theme_dark_onErrorContainer = Color(0xFFffdad4)
|
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_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_onSurface = Color(0xFFe1e3dd)
|
||||||
val md_theme_dark_surfaceVariant = Color(0xFF414940)
|
val md_theme_dark_surfaceVariant = Color(0xFF414940)
|
||||||
val md_theme_dark_onSurfaceVariant = Color(0xFFc1c9be)
|
val md_theme_dark_onSurfaceVariant = Color(0xFFc1c9be)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user