Button in new message is not slim but the regular size

This commit is contained in:
ThomasSession 2024-06-18 14:55:41 +10:00
parent 03b348fb69
commit b0c513228e
2 changed files with 14 additions and 1 deletions

View File

@ -56,6 +56,7 @@ import org.thoughtcrime.securesms.ui.SessionColorsParameterProvider
import org.thoughtcrime.securesms.ui.components.AppBar
import org.thoughtcrime.securesms.ui.components.BorderlessButtonWithIcon
import org.thoughtcrime.securesms.ui.components.MaybeScanQrCode
import org.thoughtcrime.securesms.ui.components.OutlineButton
import org.thoughtcrime.securesms.ui.components.SessionOutlinedTextField
import org.thoughtcrime.securesms.ui.components.SessionTabRow
import org.thoughtcrime.securesms.ui.components.SlimOutlineButton
@ -175,7 +176,7 @@ fun EnterAccountId(
.fillMaxWidth(),
) { onHelp() }
SlimOutlineButton(
OutlineButton(
modifier = Modifier
.align(Alignment.CenterHorizontally)
.padding(horizontal = LocalDimensions.current.marginLarge)

View File

@ -122,6 +122,18 @@ fun Button(
Button(text, onClick, color, ButtonType.Outline, modifier, enabled)
}
@Composable fun OutlineButton(modifier: Modifier = Modifier, color: Color = LocalColors.current.buttonOutline, enabled: Boolean = true, onClick: () -> Unit, content: @Composable () -> Unit) {
Button(
onClick = onClick,
color = color,
type = ButtonType.Outline,
modifier = modifier,
enabled = enabled
){
content()
}
}
@Composable fun PrimaryOutlineButton(text: String, modifier: Modifier = Modifier, enabled: Boolean = true, onClick: () -> Unit) {
Button(text, onClick, LocalColors.current.primary, ButtonType.Outline, modifier, enabled)
}