diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/expiration/ExpirationSettingsActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/expiration/ExpirationSettingsActivity.kt index 39ee9985d6..4a638cf6ac 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/expiration/ExpirationSettingsActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/expiration/ExpirationSettingsActivity.kt @@ -61,6 +61,7 @@ import org.thoughtcrime.securesms.ui.AppTheme import org.thoughtcrime.securesms.ui.CellNoMargin import org.thoughtcrime.securesms.ui.Divider import org.thoughtcrime.securesms.ui.GetString +import org.thoughtcrime.securesms.ui.LocalExtraColors import org.thoughtcrime.securesms.ui.PreviewTheme import org.thoughtcrime.securesms.ui.ThemeResPreviewParameterProvider import org.thoughtcrime.securesms.util.ConfigurationMessageUtilities @@ -302,9 +303,12 @@ fun OutlineButton(text: String, modifier: Modifier = Modifier, onClick: () -> Un OutlinedButton( modifier = modifier.size(108.dp, 34.dp), onClick = onClick, - border = BorderStroke(1.dp, MaterialTheme.colors.secondary), + border = BorderStroke(1.dp, LocalExtraColors.current.prominentButtonColor), shape = RoundedCornerShape(50), // = 50% percent - colors = ButtonDefaults.outlinedButtonColors(contentColor = MaterialTheme.colors.secondary) + colors = ButtonDefaults.outlinedButtonColors( + contentColor = LocalExtraColors.current.prominentButtonColor, + backgroundColor = MaterialTheme.colors.background + ) ){ Text(text = text) } @@ -312,7 +316,7 @@ fun OutlineButton(text: String, modifier: Modifier = Modifier, onClick: () -> Un @Preview(widthDp = 450, heightDp = 700) @Composable -fun x( +fun PreviewStates( @PreviewParameter(StatePreviewParameterProvider::class) state: State ) { PreviewTheme(R.style.Classic_Dark) { @@ -347,7 +351,7 @@ class StatePreviewParameterProvider : PreviewParameterProvider { @Preview @Composable -fun PreviewMessageDetails( +fun PreviewThemes( @PreviewParameter(ThemeResPreviewParameterProvider::class) themeResId: Int ) { PreviewTheme(themeResId) { diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/Themes.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/Themes.kt index 64bbd21d8d..3fa861fb71 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/Themes.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/Themes.kt @@ -22,6 +22,7 @@ val LocalExtraColors = staticCompositionLocalOf { error("No Custom data class ExtraColors( val settingsBackground: Color, + val prominentButtonColor: Color ) /** @@ -34,6 +35,7 @@ fun AppTheme( val extraColors = LocalContext.current.run { ExtraColors( settingsBackground = getColorFromTheme(R.attr.colorSettingsBackground), + prominentButtonColor = getColorFromTheme(R.attr.prominentButtonColor), ) }