Improve rendering of "All chats" regarding fontScale. (#984)
This commit is contained in:
parent
fb870a0903
commit
96b7923979
2 changed files with 15 additions and 1 deletions
|
|
@ -43,6 +43,8 @@ import io.element.android.libraries.designsystem.components.avatar.Avatar
|
|||
import io.element.android.libraries.designsystem.components.avatar.AvatarSize
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreviewDark
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreviewLight
|
||||
import io.element.android.libraries.designsystem.text.scaleMax
|
||||
import io.element.android.libraries.designsystem.text.toSp
|
||||
import io.element.android.libraries.designsystem.theme.aliasScreenTitle
|
||||
import io.element.android.libraries.designsystem.theme.components.DropdownMenu
|
||||
import io.element.android.libraries.designsystem.theme.components.DropdownMenuItem
|
||||
|
|
@ -114,7 +116,11 @@ private fun DefaultRoomListTopBar(
|
|||
val fontStyle = if (scrollBehavior.state.collapsedFraction > 0.5)
|
||||
ElementTheme.typography.aliasScreenTitle
|
||||
else
|
||||
ElementTheme.typography.fontHeadingLgBold
|
||||
ElementTheme.typography.fontHeadingLgBold.copy(
|
||||
// Due to a limitation of MediumTopAppBar, and to avoid the text to be truncated,
|
||||
// limit the size to 28.dp instead of 28.sp
|
||||
fontSize = 28.dp.scaleMax().toSp()
|
||||
)
|
||||
Text(
|
||||
style = fontStyle,
|
||||
text = stringResource(id = R.string.screen_roomlist_main_space_title)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue