From 3a75f2a303e0c1e819945aea8bc3b5c26146efc8 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 17 Jun 2024 13:58:52 +0930 Subject: [PATCH] Remove slim outline color --- .../org/thoughtcrime/securesms/ui/color/Colors.kt | 2 -- .../thoughtcrime/securesms/ui/components/Button.kt | 12 +++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/color/Colors.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/color/Colors.kt index ab03d53f9a..e3299d45a2 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/color/Colors.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/color/Colors.kt @@ -116,8 +116,6 @@ data class OceanLight(override val primary: Color = primaryBlue): Colors { override val qrCodeBackground = backgroundSecondary } -val Colors.slimOutlineButton: Color get() = text - @Composable fun Colors(name: String, colors: List) { Column { diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/components/Button.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/components/Button.kt index 330021bba6..148c31da04 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/components/Button.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/components/Button.kt @@ -163,21 +163,21 @@ fun Button( Button(text, onClick, LocalColors.current.primary, ButtonType.Outline, modifier, enabled) } -@Composable fun SlimOutlineButton(onClick: () -> Unit, modifier: Modifier = Modifier, color: Color = LocalColors.current.slimOutlineButton, enabled: Boolean = true, content: @Composable () -> Unit) { +@Composable fun SlimOutlineButton(onClick: () -> Unit, modifier: Modifier = Modifier, color: Color = LocalColors.current.text, enabled: Boolean = true, content: @Composable () -> Unit) { Button(onClick, color, ButtonType.Outline, modifier, enabled, ButtonSize.Slim) { content() } } /** * Courtesy [SlimOutlineButton] implementation for buttons that just display text. */ -@Composable fun SlimOutlineButton(text: String, modifier: Modifier = Modifier, color: Color = LocalColors.current.slimOutlineButton, enabled: Boolean = true, onClick: () -> Unit) { +@Composable fun SlimOutlineButton(text: String, modifier: Modifier = Modifier, color: Color = LocalColors.current.text, enabled: Boolean = true, onClick: () -> Unit) { Button(text, onClick, color, ButtonType.Outline, modifier, enabled, ButtonSize.Slim) } @Composable fun SlimOutlineCopyButton( modifier: Modifier = Modifier, - color: Color = LocalColors.current.slimOutlineButton, + color: Color = LocalColors.current.text, onClick: () -> Unit ) { OutlineCopyButton(modifier, ButtonSize.Slim, color, onClick) @@ -384,8 +384,10 @@ private fun VariousButtons( verticalArrangement = Arrangement.spacedBy(8.dp) ) { PrimaryFillButton("Primary Fill") {} - OutlineButton(text = "Outline Button") {} - SlimOutlineButton(text = "Slim Outline") {} + OutlineButton("Outline Button") {} + SlimOutlineButton("Slim Outline") {} + SlimOutlineButton("Slim Primary", color = LocalColors.current.buttonOutline) {} + SlimOutlineButton("Slim Danger", color = LocalColors.current.danger) {} SlimOutlineCopyButton {} } }