mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 02:25:19 +00:00
Fix outline button colors
This commit is contained in:
parent
e95c842051
commit
bc83c3da52
@ -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<State> {
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
fun PreviewMessageDetails(
|
||||
fun PreviewThemes(
|
||||
@PreviewParameter(ThemeResPreviewParameterProvider::class) themeResId: Int
|
||||
) {
|
||||
PreviewTheme(themeResId) {
|
||||
|
@ -22,6 +22,7 @@ val LocalExtraColors = staticCompositionLocalOf<ExtraColors> { 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),
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user