mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Outlined button tweaks
Force the height in InviteSummaryRow as compose defaults to a min height of 40dp Change the button text style to ignore font padding so the text aligns properly
This commit is contained in:
+5
-5
@@ -145,8 +145,8 @@ internal fun DefaultInviteSummaryRow(
|
|||||||
OutlinedButton(
|
OutlinedButton(
|
||||||
content = { Text(stringResource(StringR.string.action_decline), style = ElementTextStyles.Button) },
|
content = { Text(stringResource(StringR.string.action_decline), style = ElementTextStyles.Button) },
|
||||||
onClick = onDeclineClicked,
|
onClick = onDeclineClicked,
|
||||||
modifier = Modifier.weight(1f),
|
modifier = Modifier.weight(1f).heightIn(max = 36.dp),
|
||||||
contentPadding = PaddingValues(horizontal = 24.dp, vertical = 7.dp),
|
contentPadding = PaddingValues(horizontal = 24.dp, vertical = 0.dp),
|
||||||
)
|
)
|
||||||
|
|
||||||
Spacer(modifier = Modifier.width(12.dp))
|
Spacer(modifier = Modifier.width(12.dp))
|
||||||
@@ -154,8 +154,8 @@ internal fun DefaultInviteSummaryRow(
|
|||||||
Button(
|
Button(
|
||||||
content = { Text(stringResource(StringR.string.action_accept), style = ElementTextStyles.Button) },
|
content = { Text(stringResource(StringR.string.action_accept), style = ElementTextStyles.Button) },
|
||||||
onClick = onAcceptClicked,
|
onClick = onAcceptClicked,
|
||||||
modifier = Modifier.weight(1f),
|
modifier = Modifier.weight(1f).heightIn(max = 36.dp),
|
||||||
contentPadding = PaddingValues(horizontal = 24.dp, vertical = 7.dp),
|
contentPadding = PaddingValues(horizontal = 24.dp, vertical = 0.dp),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -175,7 +175,7 @@ internal fun DefaultInviteSummaryRow(
|
|||||||
private fun SenderRow(sender: InviteSender) {
|
private fun SenderRow(sender: InviteSender) {
|
||||||
Row(
|
Row(
|
||||||
horizontalArrangement = Arrangement.spacedBy(4.dp),
|
horizontalArrangement = Arrangement.spacedBy(4.dp),
|
||||||
modifier = Modifier.padding(top = 12.dp),
|
modifier = Modifier.padding(top = 6.dp),
|
||||||
) {
|
) {
|
||||||
Avatar(
|
Avatar(
|
||||||
avatarData = sender.avatarData.copy(size = AvatarSize.Custom(16.dp)),
|
avatarData = sender.avatarData.copy(size = AvatarSize.Custom(16.dp)),
|
||||||
|
|||||||
+3
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package io.element.android.libraries.designsystem
|
package io.element.android.libraries.designsystem
|
||||||
|
|
||||||
|
import androidx.compose.ui.text.PlatformTextStyle
|
||||||
import androidx.compose.ui.text.TextStyle
|
import androidx.compose.ui.text.TextStyle
|
||||||
import androidx.compose.ui.text.font.FontStyle
|
import androidx.compose.ui.text.font.FontStyle
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
@@ -25,12 +26,14 @@ import androidx.compose.ui.unit.sp
|
|||||||
// TODO Remove
|
// TODO Remove
|
||||||
object ElementTextStyles {
|
object ElementTextStyles {
|
||||||
|
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
val Button = TextStyle(
|
val Button = TextStyle(
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
lineHeight = 22.sp,
|
lineHeight = 22.sp,
|
||||||
fontStyle = FontStyle.Normal,
|
fontStyle = FontStyle.Normal,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
|
platformStyle = PlatformTextStyle(includeFontPadding = false)
|
||||||
)
|
)
|
||||||
|
|
||||||
object Bold {
|
object Bold {
|
||||||
|
|||||||
Reference in New Issue
Block a user