Skip to content

Commit 225b743

Browse files
committed
Fix title in autoconnect guide
1 parent 3632344 commit 225b743

File tree

3 files changed

+19
-1
lines changed
  • android
    • app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component
    • lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme

3 files changed

+19
-1
lines changed

android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt

+10-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api
2121
import androidx.compose.material3.Icon
2222
import androidx.compose.material3.IconButton
2323
import androidx.compose.material3.LargeTopAppBar
24+
import androidx.compose.material3.LocalTextStyle
2425
import androidx.compose.material3.MaterialTheme
2526
import androidx.compose.material3.MediumTopAppBar
2627
import androidx.compose.material3.Surface
@@ -38,6 +39,7 @@ import androidx.compose.ui.platform.testTag
3839
import androidx.compose.ui.res.painterResource
3940
import androidx.compose.ui.res.pluralStringResource
4041
import androidx.compose.ui.res.stringResource
42+
import androidx.compose.ui.text.style.LineBreak
4143
import androidx.compose.ui.text.style.TextOverflow
4244
import androidx.compose.ui.tooling.preview.Preview
4345
import androidx.compose.ui.unit.dp
@@ -276,7 +278,14 @@ fun MullvadLargeTopBar(
276278
scrollBehavior: TopAppBarScrollBehavior? = null
277279
) {
278280
LargeTopAppBar(
279-
title = { Text(text = title, maxLines = 2, overflow = TextOverflow.Ellipsis) },
281+
title = {
282+
Text(
283+
text = title,
284+
maxLines = 2,
285+
overflow = TextOverflow.Ellipsis,
286+
style = LocalTextStyle.current.copy(lineBreak = LineBreak.Heading)
287+
)
288+
},
280289
navigationIcon = navigationIcon,
281290
scrollBehavior = scrollBehavior,
282291
colors =

android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Theme.kt

+6
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ import net.mullvad.mullvadvpn.lib.theme.typeface.TypeScale
4848
private val MullvadTypography =
4949
Typography(
5050
headlineLarge = TextStyle(fontSize = TypeScale.TextHuge, fontWeight = FontWeight.Bold),
51+
headlineMedium =
52+
TextStyle(
53+
fontWeight = FontWeight.Bold,
54+
fontSize = TypeScale.TextHeadline,
55+
lineHeight = TypeScale.HeadlineMediumLineHeight,
56+
),
5157
headlineSmall = TextStyle(fontSize = TypeScale.TextBig, fontWeight = FontWeight.Bold),
5258
bodySmall = TextStyle(fontSize = TypeScale.TextSmall),
5359
titleSmall = TextStyle(fontSize = TypeScale.TextMedium, fontWeight = FontWeight.SemiBold),

android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/typeface/TypeScale.kt

+3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ import androidx.compose.ui.unit.sp
1212
*/
1313
internal object TypeScale {
1414
val TextHuge = 30.sp
15+
val TextHeadline = 28.sp
1516
val TextBig = 24.sp
1617
val TextMediumPlus = 18.sp
1718
val TextMedium = 16.sp
1819
val TextSmall = 13.sp
1920
val TitleLarge = 22.sp
21+
22+
val HeadlineMediumLineHeight = 36.0.sp
2023
}

0 commit comments

Comments
 (0)