Skip to content

Commit 220ac09

Browse files
committed
chore(fc): center align titles on room card
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent 4319e13 commit 220ac09

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

  • flipchatApp/src/main/kotlin/xyz/flipchat/app/ui/room

flipchatApp/src/main/kotlin/xyz/flipchat/app/ui/room/RoomCard.kt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,21 +134,17 @@ fun RoomCard(
134134
modifier = Modifier
135135
.padding(horizontal = CodeTheme.dimens.grid.x4)
136136
.constrain(
137-
mode = ConstraintMode.AutoSize(
138-
CodeTheme.typography.displaySmall.copy(
139-
fontSize = 16.sp
140-
)
141-
),
137+
mode = ConstraintMode.AutoSize(CodeTheme.typography.displaySmall),
142138
text = roomInfo.title,
143-
style = CodeTheme.typography.displaySmall,
139+
style = CodeTheme.typography.displaySmall.copy(textAlign = TextAlign.Center),
144140
frameConstraints = Constraints(
145141
maxWidth = with(LocalDensity.current) { maxWidth.roundToPx() },
146142
maxHeight = with(LocalDensity.current) { titleSize.height.roundToPx() },
147143
)
148144
) { textSize = it },
149145
text = roomInfo.title,
150146
style = CodeTheme.typography.displaySmall
151-
.copy(fontSize = textSize, lineHeight = 24.sp)
147+
.copy(fontSize = textSize, lineHeight = 24.sp, textAlign = TextAlign.Center)
152148
.withDropShadow(),
153149
color = Color.White,
154150
maxLines = 3

0 commit comments

Comments
 (0)