mirror of
https://github.com/bitwarden/android.git
synced 2026-03-11 20:54:58 -05:00
[DynamicColors] Update toggle button switch dynamic color scheme (#4886)
This commit is contained in:
@@ -398,9 +398,9 @@ private fun BitwardenSwitch_preview() {
|
||||
isChecked = true,
|
||||
onCheckedChange = {},
|
||||
tooltip = TooltipData(
|
||||
onClick = { },
|
||||
contentDescription = "content description",
|
||||
),
|
||||
onClick = { },
|
||||
contentDescription = "content description",
|
||||
),
|
||||
actions = {
|
||||
BitwardenStandardIconButton(
|
||||
vectorIconRes = R.drawable.ic_generate,
|
||||
@@ -408,19 +408,19 @@ private fun BitwardenSwitch_preview() {
|
||||
onClick = {},
|
||||
)
|
||||
},
|
||||
cardStyle = CardStyle.Middle(),
|
||||
)
|
||||
BitwardenSwitch(
|
||||
label = "Label",
|
||||
supportingText = "description",
|
||||
isChecked = true,
|
||||
onCheckedChange = {},
|
||||
tooltip = TooltipData(
|
||||
onClick = { },
|
||||
contentDescription = "content description",
|
||||
),
|
||||
cardStyle = CardStyle.Middle(),
|
||||
)
|
||||
cardStyle = CardStyle.Middle(),
|
||||
)
|
||||
BitwardenSwitch(
|
||||
label = "Label",
|
||||
supportingText = "description",
|
||||
isChecked = true,
|
||||
onCheckedChange = {},
|
||||
tooltip = TooltipData(
|
||||
onClick = { },
|
||||
contentDescription = "content description",
|
||||
),
|
||||
cardStyle = CardStyle.Middle(),
|
||||
)
|
||||
BitwardenSwitch(
|
||||
label = "Label",
|
||||
isChecked = false,
|
||||
|
||||
@@ -159,7 +159,7 @@ val lightBitwardenColorScheme: BitwardenColorScheme = BitwardenColorScheme(
|
||||
)
|
||||
|
||||
/**
|
||||
* Creates a [BitwardenColorScheme] for dark mode based on dynamic Material You colors.
|
||||
* Creates a [BitwardenColorScheme] based on dynamic Material You colors.
|
||||
*/
|
||||
@Suppress("LongMethod")
|
||||
fun dynamicBitwardenColorScheme(
|
||||
@@ -181,7 +181,7 @@ fun dynamicBitwardenColorScheme(
|
||||
secondary = materialColorScheme.surfaceContainer,
|
||||
tertiary = materialColorScheme.surfaceContainerHighest,
|
||||
alert = materialColorScheme.error,
|
||||
scrim = materialColorScheme.scrim,
|
||||
scrim = materialColorScheme.scrim.copy(alpha = 0.4f),
|
||||
pressed = materialColorScheme.onSurfaceVariant,
|
||||
),
|
||||
stroke = BitwardenColorScheme.StrokeColors(
|
||||
@@ -215,8 +215,8 @@ fun dynamicBitwardenColorScheme(
|
||||
),
|
||||
toggleButton = BitwardenColorScheme.ToggleButtonColors(
|
||||
backgroundOn = materialColorScheme.primary,
|
||||
backgroundOff = materialColorScheme.surfaceContainerHighest,
|
||||
switch = materialColorScheme.onPrimaryContainer,
|
||||
backgroundOff = materialColorScheme.onSurfaceVariant,
|
||||
switch = materialColorScheme.onPrimary,
|
||||
),
|
||||
sliderButton = BitwardenColorScheme.SliderButtonColors(
|
||||
knobBackground = materialColorScheme.primary,
|
||||
|
||||
Reference in New Issue
Block a user