Remove lineHeight parameter. Must use style only.
This commit is contained in:
committed by
Benoit Marty
parent
68f14141d6
commit
277595412f
@@ -38,6 +38,7 @@ import io.element.android.libraries.designsystem.preview.ElementPreviewLight
|
||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||
import io.element.android.libraries.designsystem.theme.components.RadioButton
|
||||
import io.element.android.libraries.designsystem.theme.components.Text
|
||||
import io.element.android.libraries.theme.ElementTheme
|
||||
|
||||
@Composable
|
||||
fun RoomPrivacyOption(
|
||||
@@ -76,8 +77,7 @@ fun RoomPrivacyOption(
|
||||
Spacer(Modifier.size(3.dp))
|
||||
Text(
|
||||
text = roomPrivacyItem.description,
|
||||
fontSize = 12.sp,
|
||||
lineHeight = 17.sp,
|
||||
style = ElementTheme.typography.fontBodySmRegular,
|
||||
color = MaterialTheme.colorScheme.tertiary,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -141,7 +141,10 @@ private fun ReactionContent(
|
||||
) {
|
||||
Text(
|
||||
text = reaction.displayKey,
|
||||
fontSize = 15.sp, lineHeight = reactionEmojiLineHeight
|
||||
style = ElementTheme.typography.fontBodyMdRegular.copy(
|
||||
fontSize = 15.sp,
|
||||
lineHeight = reactionEmojiLineHeight,
|
||||
),
|
||||
)
|
||||
if (reaction.count > 1) {
|
||||
Spacer(modifier = Modifier.width(4.dp))
|
||||
@@ -175,9 +178,11 @@ internal fun MessagesReactionExtraButtonsPreview() = ElementPreview {
|
||||
onClick = {}
|
||||
)
|
||||
MessagesReactionButton(
|
||||
content = MessagesReactionsButtonContent.Reaction(aTimelineItemReactions().reactions.first().copy(
|
||||
key = "A very long reaction with many characters that should be truncated"
|
||||
)),
|
||||
content = MessagesReactionsButtonContent.Reaction(
|
||||
aTimelineItemReactions().reactions.first().copy(
|
||||
key = "A very long reaction with many characters that should be truncated"
|
||||
)
|
||||
),
|
||||
onClick = {}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -61,8 +61,6 @@ fun Text(
|
||||
fontStyle: FontStyle? = null,
|
||||
textDecoration: TextDecoration? = null,
|
||||
textAlign: TextAlign? = null,
|
||||
// Will be removed, only style should be used
|
||||
lineHeight: TextUnit = TextUnit.Unspecified,
|
||||
overflow: TextOverflow = TextOverflow.Clip,
|
||||
softWrap: Boolean = true,
|
||||
minLines: Int = 1,
|
||||
@@ -78,7 +76,6 @@ fun Text(
|
||||
fontStyle = fontStyle,
|
||||
textDecoration = textDecoration,
|
||||
textAlign = textAlign,
|
||||
lineHeight = lineHeight,
|
||||
overflow = overflow,
|
||||
softWrap = softWrap,
|
||||
minLines = minLines,
|
||||
|
||||
@@ -32,7 +32,6 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
@@ -45,7 +44,6 @@ import io.element.android.libraries.designsystem.theme.components.Checkbox
|
||||
import io.element.android.libraries.designsystem.theme.components.Divider
|
||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||
import io.element.android.libraries.designsystem.theme.components.Text
|
||||
import io.element.android.libraries.designsystem.theme.noFontPadding
|
||||
import io.element.android.libraries.matrix.ui.model.getAvatarData
|
||||
import io.element.android.libraries.theme.ElementTheme
|
||||
import io.element.android.libraries.ui.strings.CommonStrings
|
||||
@@ -97,8 +95,7 @@ fun UnresolvedUserRow(
|
||||
Text(
|
||||
text = stringResource(CommonStrings.common_invite_unknown_profile),
|
||||
color = MaterialTheme.colorScheme.secondary,
|
||||
fontSize = 12.sp,
|
||||
lineHeight = 16.sp,
|
||||
style = ElementTheme.typography.fontBodySmRegular.copy(lineHeight = 16.sp),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user