Remove unused button colors

This commit is contained in:
Andrew 2024-06-24 09:25:06 +09:30
parent d8f032ff9e
commit e9dd333034
3 changed files with 4 additions and 16 deletions

View File

@ -41,20 +41,8 @@ interface Colors {
val backgroundBubbleSent: Color get() = primary
val qrCodeContent: Color
val qrCodeBackground: Color
// buttonFill
val buttonFill: Color get() = text
val buttonFillText: Color get() = background
// primaryButtonFill
val primaryButtonFill: Color
val primaryButtonFillText: Color
// buttonOutline
val buttonOutline get() = text
// primaryButtonOutline
val primaryButtonOutline get() = primaryButtonFill
}
val Colors.textSelectionColors get() = TextSelectionColors(

View File

@ -141,7 +141,7 @@ fun Button(
}
@Composable fun SlimPrimaryOutlineButton(text: String, modifier: Modifier = Modifier, enabled: Boolean = true, onClick: () -> Unit) {
Button(text, onClick, ButtonType.Outline(LocalColors.current.primaryButtonOutline), modifier, enabled, ButtonStyle.Slim)
Button(text, onClick, ButtonType.Outline(LocalColors.current.primaryButtonFill), modifier, enabled, ButtonStyle.Slim)
}
@Composable
@ -150,7 +150,7 @@ fun PrimaryOutlineCopyButton(
style: ButtonStyle = ButtonStyle.Large,
onClick: () -> Unit
) {
OutlineCopyButton(modifier, style, LocalColors.current.primaryButtonOutline, onClick)
OutlineCopyButton(modifier, style, LocalColors.current.primaryButtonFill, onClick)
}
@Composable
@ -307,7 +307,7 @@ private fun VariousButtons(
OutlineButton("Outline Button Disabled", enabled = false) {}
SlimOutlineButton("Slim Outline") {}
SlimOutlineButton("Slim Outline Disabled", enabled = false) {}
SlimOutlineButton("Slim Primary", color = LocalColors.current.primaryButtonFill) {}
SlimPrimaryOutlineButton("Slim Primary") {}
SlimOutlineButton("Slim Danger", color = LocalColors.current.danger) {}
BorderlessButton("Borderless Button") {}
BorderlessButton("Borderless Secondary", color = LocalColors.current.textSecondary) {}

View File

@ -44,7 +44,7 @@ interface ButtonType {
@Composable
override fun buttonColors() = ButtonDefaults.buttonColors(
contentColor = LocalColors.current.background,
backgroundColor = LocalColors.current.buttonFill,
backgroundColor = LocalColors.current.text,
disabledContentColor = LocalColors.current.disabled,
disabledBackgroundColor = Color.Unspecified
)