summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-07-02 09:31:42 +0200
committerJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-07-02 09:31:42 +0200
commit4348e9e439d5b7939708cda2eb1722fe2be6fc9a (patch)
treee647dcc3c21027b31a15757e92fef51c6e2d9afd
parent23363300ae11eb77bd58702816edc94003472ed9 (diff)
parent0278d8951283733380f9b2221a40e4251a390c18 (diff)
downloadmullvadvpn-4348e9e439d5b7939708cda2eb1722fe2be6fc9a.tar.xz
mullvadvpn-4348e9e439d5b7939708cda2eb1722fe2be6fc9a.zip
Merge branch 'standardize-typography-droid-830'
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/BaseCell.kt9
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/CheckboxCell.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/CustomPortCell.kt3
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/DnsCell.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ExpandableComposeCell.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/FilterRow.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/IconCell.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/MtuComposeCell.kt3
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/NavigationComposeCell.kt6
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ObfuscationModeCell.kt8
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/RelayLocationCell.kt1
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SelectableCell.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ServerIpOverridesCell.kt1
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SplitTunnelingCell.kt3
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SwitchComposeCell.kt37
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/ConnectionStatusText.kt3
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/DeviceListItem.kt8
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/EmptyRelayListText.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/FeatureChip.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/FilterChip.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/InformationView.kt10
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/LocationsEmptyText.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/MullvadExposedDropdownMenuBox.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/SpacedColumn.kt6
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/connectioninfo/ConnectionDetailPanel.kt12
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/connectioninfo/ConnectionInfoHeader.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/CreateAccountConfirmationDialog.kt8
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DaitaDirectOnlyConfirmationDialog.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/ManageDevicesRemoveConfirmationDialog.kt29
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/NegativeConfirmationDialog.kt10
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/RedeemVoucherDialog.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/RemoveDeviceConfirmationDialog.kt12
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/ReportProblemNoEmailDialog.kt3
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/ResetServerIpOverridesConfirmationDialog.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/SaveApiAccessMethodDialog.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/info/InfoDialog.kt8
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/payment/VerificationPendingDialog.kt9
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AccountScreen.kt6
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ApiAccessListScreen.kt8
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AppInfoScreen.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AutoConnectAndLockdownModeScreen.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ChangelogScreen.kt8
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreen.kt6
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListLocationsScreen.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListsScreen.kt3
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/DaitaScreen.kt1
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/DeviceListScreen.kt3
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/DeviceRevokedScreen.kt6
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/EditApiAccessMethodScreen.kt25
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/EditCustomListScreen.kt23
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/LoginScreen.kt9
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ManageDevicesScreen.kt1
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/MultihopScreen.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/OutOfTimeScreen.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/PrivacyDisclaimerScreen.kt6
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ReportProblemScreen.kt13
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ServerIpOverridesScreen.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ShadowsocksSettingsScreen.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SplitTunnelingScreen.kt3
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/Udp2TcpSettingsScreen.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/VpnSettingsScreen.kt7
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/WelcomeScreen.kt17
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SearchLocationScreen.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SelectLocationList.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/textfield/CustomTextField.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/textfield/SearchTextField.kt4
-rw-r--r--android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Theme.kt34
-rw-r--r--android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Type.kt47
-rw-r--r--android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/dimensions/Dimensions.kt4
-rw-r--r--android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/typeface/TypeScale.kt23
-rw-r--r--android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/typeface/Typeface.kt45
-rw-r--r--android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/AnimatedNotificationBanner.kt4
73 files changed, 235 insertions, 336 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/BaseCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/BaseCell.kt
index 8e22be8b7e..2062b5ac6f 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/BaseCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/BaseCell.kt
@@ -117,12 +117,7 @@ internal fun BaseCellTitle(
}
@Composable
-fun BaseSubtitleCell(
- text: String,
- modifier: Modifier = Modifier,
- style: TextStyle = MaterialTheme.typography.labelMedium,
- color: Color,
-) {
+fun BaseSubtitleCell(text: String, modifier: Modifier = Modifier, style: TextStyle, color: Color) {
BaseSubtitleCell(
text = AnnotatedString(text),
modifier = modifier,
@@ -135,7 +130,7 @@ fun BaseSubtitleCell(
fun BaseSubtitleCell(
text: AnnotatedString,
modifier: Modifier = Modifier,
- style: TextStyle = MaterialTheme.typography.labelMedium,
+ style: TextStyle = MaterialTheme.typography.bodyMedium,
color: Color,
) {
Text(
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/CheckboxCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/CheckboxCell.kt
index 7bf7a2262a..a3fbd4d94d 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/CheckboxCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/CheckboxCell.kt
@@ -50,7 +50,7 @@ internal fun CheckboxCell(
Text(
text = title,
- style = MaterialTheme.typography.labelLarge,
+ style = MaterialTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurface,
modifier =
Modifier.weight(1f)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/CustomPortCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/CustomPortCell.kt
index 3c0947968f..91048449e8 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/CustomPortCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/CustomPortCell.kt
@@ -96,7 +96,7 @@ fun CustomPortCell(
)
BaseCellTitle(
title = title,
- style = MaterialTheme.typography.labelLarge,
+ style = MaterialTheme.typography.bodyLarge,
textAlign = TextAlign.Start,
textColor =
if (isSelected) {
@@ -128,6 +128,7 @@ fun CustomPortCell(
AlphaDisabled
}
),
+ style = MaterialTheme.typography.bodyMedium,
modifier = Modifier.align(Alignment.Center),
)
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/DnsCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/DnsCell.kt
index 23f8145292..972a8dc3dd 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/DnsCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/DnsCell.kt
@@ -81,7 +81,7 @@ private fun RowScope.DnsTitle(address: String, modifier: Modifier = Modifier) {
Text(
text = address,
color = MaterialTheme.colorScheme.onSurface,
- style = MaterialTheme.typography.labelLarge,
+ style = MaterialTheme.typography.bodyLarge,
textAlign = TextAlign.Start,
modifier = modifier.weight(1f),
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ExpandableComposeCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ExpandableComposeCell.kt
index 5fbd2fe86c..536a7ef8b8 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ExpandableComposeCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ExpandableComposeCell.kt
@@ -119,7 +119,7 @@ fun ContentBlockersDisableModeCellSubtitle(modifier: Modifier) {
id = R.string.dns_content_blockers_subtitle,
stringResource(id = R.string.enable_custom_dns),
),
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = modifier,
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/FilterRow.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/FilterRow.kt
index 23bbd38b2f..5ac7c765f0 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/FilterRow.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/FilterRow.kt
@@ -54,7 +54,7 @@ fun FilterRow(
Text(
text = stringResource(id = R.string.filters),
color = MaterialTheme.colorScheme.onPrimary,
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.labelLarge,
)
}
filters.forEach {
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/IconCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/IconCell.kt
index 4bef6416ee..da2aeaed31 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/IconCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/IconCell.kt
@@ -49,7 +49,7 @@ fun IconCell(
title: String,
modifier: Modifier = Modifier,
contentDescription: String? = null,
- titleStyle: TextStyle = MaterialTheme.typography.labelLarge,
+ titleStyle: TextStyle = MaterialTheme.typography.bodyLarge,
titleColor: Color = MaterialTheme.colorScheme.onPrimary,
onClick: () -> Unit = {},
background: Color = MaterialTheme.colorScheme.primary,
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/MtuComposeCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/MtuComposeCell.kt
index 64859b9cce..0f83fe4f8f 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/MtuComposeCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/MtuComposeCell.kt
@@ -54,6 +54,7 @@ private fun MtuBodyView(mtuValue: Mtu?, modifier: Modifier) {
Text(
text = mtuValue?.value?.toString() ?: stringResource(id = R.string.hint_default),
color = MaterialTheme.colorScheme.onPrimary,
+ style = MaterialTheme.typography.bodyLarge,
)
}
}
@@ -62,7 +63,7 @@ private fun MtuBodyView(mtuValue: Mtu?, modifier: Modifier) {
fun MtuSubtitle(modifier: Modifier = Modifier) {
BaseSubtitleCell(
text = stringResource(R.string.wireguard_mtu_footer, MTU_MIN_VALUE, MTU_MAX_VALUE),
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = modifier,
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/NavigationComposeCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/NavigationComposeCell.kt
index 21b3e4ebd9..25dda7d3d0 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/NavigationComposeCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/NavigationComposeCell.kt
@@ -17,6 +17,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import net.mullvad.mullvadvpn.lib.theme.AppTheme
@@ -67,6 +68,7 @@ fun NavigationComposeCell(
modifier: Modifier = Modifier,
showWarning: Boolean = false,
textColor: Color = MaterialTheme.colorScheme.onPrimary,
+ textStyle: TextStyle = MaterialTheme.typography.titleMedium,
bodyView: @Composable () -> Unit = {
Icon(Icons.Default.ChevronRight, contentDescription = title, tint = textColor)
},
@@ -80,6 +82,7 @@ fun NavigationComposeCell(
headlineContent = {
NavigationTitleView(
title = title,
+ style = textStyle,
modifier = Modifier.weight(1f, true),
showWarning = showWarning,
)
@@ -95,6 +98,7 @@ internal fun NavigationTitleView(
title: String,
modifier: Modifier = Modifier,
showWarning: Boolean = false,
+ style: TextStyle = MaterialTheme.typography.titleMedium,
) {
if (showWarning) {
Icon(
@@ -106,7 +110,7 @@ internal fun NavigationTitleView(
}
Text(
text = title,
- style = MaterialTheme.typography.titleMedium,
+ style = style,
color = MaterialTheme.colorScheme.onPrimary,
modifier = modifier,
maxLines = 1,
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ObfuscationModeCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ObfuscationModeCell.kt
index c24d975e3c..aa7416218a 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ObfuscationModeCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ObfuscationModeCell.kt
@@ -33,8 +33,6 @@ import net.mullvad.mullvadvpn.lib.model.Port
import net.mullvad.mullvadvpn.lib.theme.AppTheme
import net.mullvad.mullvadvpn.lib.theme.Dimens
import net.mullvad.mullvadvpn.lib.theme.color.selected
-import net.mullvad.mullvadvpn.lib.theme.typeface.listItemSubText
-import net.mullvad.mullvadvpn.lib.theme.typeface.listItemText
@Preview
@Composable
@@ -74,10 +72,10 @@ fun ObfuscationModeCell(
) {
TwoRowCell(
modifier = Modifier.weight(1f),
- titleStyle = MaterialTheme.typography.listItemText,
+ titleStyle = MaterialTheme.typography.bodyLarge,
titleColor = MaterialTheme.colorScheme.onSurface,
- subtitleStyle = MaterialTheme.typography.listItemSubText,
- subtitleColor = MaterialTheme.colorScheme.onSurface,
+ subtitleStyle = MaterialTheme.typography.labelLarge,
+ subtitleColor = MaterialTheme.colorScheme.onSurfaceVariant,
titleText = obfuscationMode.toTitle(),
subtitleText = stringResource(id = R.string.port_x, port.toSubTitle()),
onCellClicked = { onSelected(obfuscationMode) },
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/RelayLocationCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/RelayLocationCell.kt
index 85a39f4213..45fd0d3bd0 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/RelayLocationCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/RelayLocationCell.kt
@@ -227,6 +227,7 @@ private fun Name(
)
.padding(horizontal = Dimens.smallPadding, vertical = Dimens.mediumPadding),
maxLines = 1,
+ style = MaterialTheme.typography.bodyLarge,
overflow = TextOverflow.Ellipsis,
)
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SelectableCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SelectableCell.kt
index 9761f7891e..b5da9c9ad6 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SelectableCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SelectableCell.kt
@@ -50,7 +50,7 @@ fun SelectableCell(
isEnabled = isEnabled,
)
},
- titleStyle: TextStyle = MaterialTheme.typography.labelLarge,
+ titleStyle: TextStyle = MaterialTheme.typography.bodyLarge,
startPadding: Dp = Dimens.cellStartPadding,
selectedColor: Color = MaterialTheme.colorScheme.selected,
backgroundColor: Color = MaterialTheme.colorScheme.surfaceContainerHighest,
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ServerIpOverridesCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ServerIpOverridesCell.kt
index 13dc99b8a4..53f77b8d7f 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ServerIpOverridesCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ServerIpOverridesCell.kt
@@ -61,6 +61,7 @@ fun ServerIpOverridesCell(
if (active) stringResource(id = R.string.server_ip_overrides_active)
else stringResource(id = R.string.server_ip_overrides_inactive),
color = MaterialTheme.colorScheme.onPrimary,
+ style = MaterialTheme.typography.bodyLarge,
modifier =
Modifier.weight(1f)
.alpha(
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SplitTunnelingCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SplitTunnelingCell.kt
index 96bf9d5c90..796ce53baa 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SplitTunnelingCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SplitTunnelingCell.kt
@@ -37,7 +37,6 @@ import net.mullvad.mullvadvpn.compose.util.isBelowMaxSize
import net.mullvad.mullvadvpn.lib.theme.AppTheme
import net.mullvad.mullvadvpn.lib.theme.Dimens
import net.mullvad.mullvadvpn.lib.theme.color.AlphaDisabled
-import net.mullvad.mullvadvpn.lib.theme.typeface.listItemText
@Preview
@Composable
@@ -94,7 +93,7 @@ fun SplitTunnelingCell(
headlineContent = {
Text(
text = title,
- style = MaterialTheme.typography.listItemText,
+ style = MaterialTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurface,
modifier =
Modifier.weight(1f)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SwitchComposeCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SwitchComposeCell.kt
index bdf383c74e..db845fe1ea 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SwitchComposeCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SwitchComposeCell.kt
@@ -11,20 +11,18 @@ import androidx.compose.material.icons.filled.Info
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
-import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.focusProperties
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
-import androidx.compose.ui.text.AnnotatedString
+import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import net.mullvad.mullvadvpn.R
import net.mullvad.mullvadvpn.compose.component.MullvadSwitch
import net.mullvad.mullvadvpn.compose.component.SpacedColumn
-import net.mullvad.mullvadvpn.compose.component.textResource
import net.mullvad.mullvadvpn.lib.theme.AppTheme
import net.mullvad.mullvadvpn.lib.theme.Dimens
import net.mullvad.mullvadvpn.lib.theme.color.AlphaDisabled
@@ -68,7 +66,7 @@ fun NormalSwitchComposeCell(
titleView = {
BaseCellTitle(
title = title,
- style = MaterialTheme.typography.labelLarge,
+ style = MaterialTheme.typography.bodyLarge,
modifier = Modifier.weight(1f, true),
textColor = if (isEnabled) onBackground else onBackground.copy(AlphaDisabled),
)
@@ -180,38 +178,11 @@ fun SwitchCellView(
}
@Composable
-fun CustomDnsCellSubtitle(isCellClickable: Boolean, modifier: Modifier) {
- val text =
- if (isCellClickable) {
- textResource(id = R.string.custom_dns_footer)
- } else {
- textResource(
- id = R.string.custom_dns_disable_mode_subtitle,
- textResource(id = R.string.dns_content_blockers),
- )
- }
- Text(
- text = text,
- style = MaterialTheme.typography.labelMedium,
- color = MaterialTheme.colorScheme.onSurfaceVariant,
- modifier = modifier,
- )
-}
-
-@Composable
fun SwitchComposeSubtitleCell(
text: String,
modifier: Modifier = Modifier,
+ style: TextStyle = MaterialTheme.typography.bodyMedium,
color: Color = MaterialTheme.colorScheme.onSurfaceVariant,
) {
- BaseSubtitleCell(text = text, modifier = modifier, color = color)
-}
-
-@Composable
-fun SwitchComposeSubtitleCell(
- text: AnnotatedString,
- modifier: Modifier = Modifier,
- color: Color = MaterialTheme.colorScheme.onSurfaceVariant,
-) {
- BaseSubtitleCell(text = text, modifier = modifier, color = color)
+ BaseSubtitleCell(text = text, modifier = modifier, style = style, color = color)
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/ConnectionStatusText.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/ConnectionStatusText.kt
index a308802042..5d6afcb73f 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/ConnectionStatusText.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/ConnectionStatusText.kt
@@ -14,7 +14,6 @@ import net.mullvad.mullvadvpn.compose.preview.TunnelStatePreviewParameterProvide
import net.mullvad.mullvadvpn.lib.model.ActionAfterDisconnect
import net.mullvad.mullvadvpn.lib.model.TunnelState
import net.mullvad.mullvadvpn.lib.theme.AppTheme
-import net.mullvad.mullvadvpn.lib.theme.typeface.connectionStatus
@Preview
@Composable
@@ -33,7 +32,7 @@ fun ConnectionStatusText(state: TunnelState) {
Text(
text = state.text(),
color = state.textColor(),
- style = MaterialTheme.typography.connectionStatus,
+ style = MaterialTheme.typography.titleLarge,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/DeviceListItem.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/DeviceListItem.kt
index d8878fd0fc..29d19b0cd5 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/DeviceListItem.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/DeviceListItem.kt
@@ -17,8 +17,6 @@ import net.mullvad.mullvadvpn.compose.cell.TwoRowCell
import net.mullvad.mullvadvpn.lib.common.util.formatDate
import net.mullvad.mullvadvpn.lib.model.Device
import net.mullvad.mullvadvpn.lib.theme.Dimens
-import net.mullvad.mullvadvpn.lib.theme.typeface.listItemSubText
-import net.mullvad.mullvadvpn.lib.theme.typeface.listItemText
@Composable
fun DeviceListItem(
@@ -28,9 +26,9 @@ fun DeviceListItem(
onDeviceRemovalClicked: () -> Unit,
) {
TwoRowCell(
- titleStyle = MaterialTheme.typography.listItemText,
+ titleStyle = MaterialTheme.typography.titleMedium,
titleColor = MaterialTheme.colorScheme.onPrimary,
- subtitleStyle = MaterialTheme.typography.listItemSubText,
+ subtitleStyle = MaterialTheme.typography.labelLarge,
subtitleColor = MaterialTheme.colorScheme.onSurfaceVariant,
titleText = device.displayName(),
subtitleText = stringResource(id = R.string.created_x, device.creationDate.formatDate()),
@@ -44,7 +42,7 @@ fun DeviceListItem(
modifier = Modifier.padding(Dimens.smallPadding),
text = stringResource(R.string.current_device),
color = MaterialTheme.colorScheme.onSurfaceVariant,
- style = MaterialTheme.typography.labelLarge,
+ style = MaterialTheme.typography.bodyMedium,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/EmptyRelayListText.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/EmptyRelayListText.kt
index eb2fbf7cab..9ea75e9d6e 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/EmptyRelayListText.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/EmptyRelayListText.kt
@@ -14,7 +14,7 @@ fun EmptyRelayListText() {
Text(
text = stringResource(R.string.no_locations_found),
modifier = Modifier.padding(Dimens.cellVerticalSpacing),
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/FeatureChip.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/FeatureChip.kt
index d82ece524d..bb8fd38057 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/FeatureChip.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/FeatureChip.kt
@@ -50,7 +50,7 @@ fun MullvadFeatureChip(
label = {
Text(
text = text,
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.bodyMedium,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
@@ -86,7 +86,7 @@ fun MullvadMoreChip(
label = {
Text(
text = text,
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.bodyMedium,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/FilterChip.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/FilterChip.kt
index 92e2093177..8e97724ae7 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/FilterChip.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/FilterChip.kt
@@ -72,7 +72,7 @@ fun MullvadFilterChip(
),
selected = false,
onClick = onRemoveClick,
- label = { Text(text = text, style = MaterialTheme.typography.labelMedium) },
+ label = { Text(text = text, style = MaterialTheme.typography.labelLarge) },
trailingIcon =
if (enabled) {
{
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/InformationView.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/InformationView.kt
index a4f88a862a..6affebc2c3 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/InformationView.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/InformationView.kt
@@ -30,10 +30,10 @@ fun InformationView(
) {
return if (content.isNotEmpty()) {
AutoResizeText(
- style = MaterialTheme.typography.titleSmall,
+ style = MaterialTheme.typography.titleMedium,
text = content,
- minTextSize = MaterialTheme.typography.labelMedium.fontSize,
- maxTextSize = MaterialTheme.typography.titleSmall.fontSize,
+ minTextSize = MaterialTheme.typography.bodySmall.fontSize,
+ maxTextSize = MaterialTheme.typography.titleMedium.fontSize,
maxLines = maxLines,
modifier = modifier.padding(vertical = Dimens.smallPadding),
)
@@ -43,8 +43,8 @@ fun InformationView(
AutoResizeText(
style = MaterialTheme.typography.titleMedium,
text = content,
- minTextSize = MaterialTheme.typography.labelMedium.fontSize,
- maxTextSize = MaterialTheme.typography.titleSmall.fontSize,
+ minTextSize = MaterialTheme.typography.bodySmall.fontSize,
+ maxTextSize = MaterialTheme.typography.titleMedium.fontSize,
maxLines = maxLines,
modifier = modifier.padding(vertical = Dimens.smallPadding),
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/LocationsEmptyText.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/LocationsEmptyText.kt
index ecdf446291..9bfd6d4707 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/LocationsEmptyText.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/LocationsEmptyText.kt
@@ -14,7 +14,7 @@ import net.mullvad.mullvadvpn.lib.theme.Dimens
fun LocationsEmptyText(searchTerm: String) {
Text(
text = textResource(R.string.search_location_empty_text, searchTerm),
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.bodyMedium,
textAlign = TextAlign.Center,
color = MaterialTheme.colorScheme.onSurfaceVariant,
maxLines = 2,
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/MullvadExposedDropdownMenuBox.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/MullvadExposedDropdownMenuBox.kt
index 789a5b5f2d..3c818c2591 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/MullvadExposedDropdownMenuBox.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/MullvadExposedDropdownMenuBox.kt
@@ -19,6 +19,7 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
+import androidx.compose.ui.text.TextStyle
import net.mullvad.mullvadvpn.lib.theme.color.menuItemColors
@OptIn(ExperimentalMaterial3Api::class)
@@ -58,13 +59,14 @@ fun MullvadExposedDropdownMenuBox(
@Composable
fun MullvadDropdownMenuItem(
text: String,
+ style: TextStyle = MaterialTheme.typography.bodyLarge,
onClick: () -> Unit,
content: @Composable (() -> Unit)? = null,
) {
DropdownMenuItem(
leadingIcon = content,
colors = menuItemColors,
- text = { Text(text = text) },
+ text = { Text(text = text, style = style) },
onClick = onClick,
)
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/SpacedColumn.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/SpacedColumn.kt
index 003605404d..e1309db052 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/SpacedColumn.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/SpacedColumn.kt
@@ -13,12 +13,14 @@ import net.mullvad.mullvadvpn.lib.theme.Dimens
fun SpacedColumn(
modifier: Modifier = Modifier,
spacing: Dp = Dimens.listItemDivider,
- alignment: Alignment.Vertical = Alignment.Bottom,
+ verticalAlignment: Alignment.Vertical = Alignment.Bottom,
+ horizontalAlignment: Alignment.Horizontal = Alignment.Start,
content: @Composable ColumnScope.() -> Unit,
) {
Column(
modifier = modifier,
- verticalArrangement = Arrangement.spacedBy(spacing, alignment),
+ verticalArrangement = Arrangement.spacedBy(spacing, verticalAlignment),
+ horizontalAlignment = horizontalAlignment,
content = content,
)
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt
index 2f246e5553..61ac5af013 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt
@@ -372,7 +372,7 @@ fun MullvadTopBarWithDeviceName(
} ?: "",
maxLines = 1,
overflow = TextOverflow.Ellipsis,
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.labelLarge,
color = iconTintColor,
)
if (daysLeftUntilExpiry != null) {
@@ -390,7 +390,7 @@ fun MullvadTopBarWithDeviceName(
stringResource(id = R.string.out_of_time)
},
),
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.labelLarge,
color = iconTintColor,
)
} else {
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/connectioninfo/ConnectionDetailPanel.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/connectioninfo/ConnectionDetailPanel.kt
index 08eec406bf..e8493b97cf 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/connectioninfo/ConnectionDetailPanel.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/connectioninfo/ConnectionDetailPanel.kt
@@ -75,7 +75,7 @@ fun ConnectionDetails(
Text(
text = stringResource(R.string.connection_details_in),
color = MaterialTheme.colorScheme.onSurfaceVariant,
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.bodyMedium,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
modifier =
@@ -90,7 +90,7 @@ fun ConnectionDetails(
Text(
text = inIPV4,
color = MaterialTheme.colorScheme.onPrimary,
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.bodyMedium,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
modifier =
@@ -113,7 +113,7 @@ fun ConnectionDetails(
append(stringResource(R.string.ipv4))
},
color = MaterialTheme.colorScheme.onSurfaceVariant,
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.bodyMedium,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
modifier =
@@ -142,7 +142,7 @@ fun ConnectionDetails(
modifier = Modifier.testTag(LOCATION_INFO_CONNECTION_OUT_TEST_TAG),
text = outIPV4,
color = MaterialTheme.colorScheme.onPrimary,
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.bodyMedium,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
@@ -164,7 +164,7 @@ fun ConnectionDetails(
append(stringResource(R.string.ipv6))
},
color = MaterialTheme.colorScheme.onSurfaceVariant,
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.bodyMedium,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
modifier =
@@ -192,7 +192,7 @@ fun ConnectionDetails(
Text(
text = outIPV6,
color = MaterialTheme.colorScheme.onPrimary,
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.bodyMedium,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/connectioninfo/ConnectionInfoHeader.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/connectioninfo/ConnectionInfoHeader.kt
index fe6e5de012..0cbe213901 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/connectioninfo/ConnectionInfoHeader.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/connectioninfo/ConnectionInfoHeader.kt
@@ -13,7 +13,7 @@ fun ConnectionInfoHeader(text: String, modifier: Modifier = Modifier) {
Text(
modifier = modifier.padding(top = Dimens.smallPadding),
text = text,
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant,
overflow = TextOverflow.Ellipsis,
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/CreateAccountConfirmationDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/CreateAccountConfirmationDialog.kt
index 04f6e92f6b..28c9090d2a 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/CreateAccountConfirmationDialog.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/CreateAccountConfirmationDialog.kt
@@ -38,8 +38,8 @@ fun CreateAccountConfirmation(navigator: ResultBackNavigator<Confirmed>) {
) {
Text(
text = stringResource(id = R.string.create_new_account_warning_paragraph1),
- color = MaterialTheme.colorScheme.onSurface,
- style = MaterialTheme.typography.bodySmall,
+ color = MaterialTheme.colorScheme.onSurfaceVariant,
+ style = MaterialTheme.typography.labelLarge,
modifier = Modifier.fillMaxWidth(),
)
@@ -47,8 +47,8 @@ fun CreateAccountConfirmation(navigator: ResultBackNavigator<Confirmed>) {
Text(
text = stringResource(id = R.string.create_new_account_warning_paragraph2),
- color = MaterialTheme.colorScheme.onSurface,
- style = MaterialTheme.typography.bodySmall,
+ color = MaterialTheme.colorScheme.onSurfaceVariant,
+ style = MaterialTheme.typography.labelLarge,
modifier = Modifier.fillMaxWidth(),
)
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DaitaDirectOnlyConfirmationDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DaitaDirectOnlyConfirmationDialog.kt
index aa8d6aa216..184b47017b 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DaitaDirectOnlyConfirmationDialog.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DaitaDirectOnlyConfirmationDialog.kt
@@ -40,8 +40,8 @@ fun DaitaDirectOnlyConfirmation(navigator: ResultBackNavigator<Confirmed>) {
id = R.string.direct_only_description,
stringResource(id = R.string.daita),
),
- color = MaterialTheme.colorScheme.onSurface,
- style = MaterialTheme.typography.bodySmall,
+ color = MaterialTheme.colorScheme.onSurfaceVariant,
+ style = MaterialTheme.typography.labelLarge,
modifier = Modifier.fillMaxWidth(),
)
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/ManageDevicesRemoveConfirmationDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/ManageDevicesRemoveConfirmationDialog.kt
index 8516860ca8..c048464c33 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/ManageDevicesRemoveConfirmationDialog.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/ManageDevicesRemoveConfirmationDialog.kt
@@ -3,10 +3,6 @@ package net.mullvad.mullvadvpn.compose.dialog
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
-import androidx.compose.ui.graphics.Color
-import androidx.compose.ui.text.AnnotatedString
-import androidx.compose.ui.text.SpanStyle
-import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter
import com.ramcosta.composedestinations.annotation.Destination
@@ -22,7 +18,6 @@ import net.mullvad.mullvadvpn.compose.preview.DevicePreviewParameterProvider
import net.mullvad.mullvadvpn.lib.model.Device
import net.mullvad.mullvadvpn.lib.model.DeviceId
import net.mullvad.mullvadvpn.lib.theme.AppTheme
-import net.mullvad.mullvadvpn.util.appendTextWithStyledSubstring
@Preview
@Composable
@@ -38,32 +33,18 @@ fun ManageDevicesRemoveConfirmation(navigator: ResultBackNavigator<DeviceId>, de
InfoConfirmationDialog(
navigator = navigator,
confirmValue = device.id,
- titleType = InfoConfirmationDialogTitleType.IconOnly,
+ titleType = InfoConfirmationDialogTitleType.IconAndTitle(title = device.titleText()),
confirmButtonTitle = textResource(R.string.remove_button),
cancelButtonTitle = textResource(R.string.cancel),
) {
Text(
- text = device.descriptionText(),
+ text = textResource(id = R.string.manage_devices_confirm_removal_description_line2),
color = MaterialTheme.colorScheme.onSurfaceVariant,
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.labelLarge,
)
}
}
@Composable
-private fun Device.descriptionText(): AnnotatedString {
- val line1 =
- textResource(id = R.string.manage_devices_confirm_removal_description_line1, displayName())
-
- val line2 = textResource(id = R.string.manage_devices_confirm_removal_description_line2)
-
- return buildAnnotatedString {
- appendTextWithStyledSubstring(
- text = line1,
- substring = displayName(),
- substringStyle = SpanStyle(color = Color.White),
- )
- appendLine()
- append(line2)
- }
-}
+private fun Device.titleText(): String =
+ textResource(id = R.string.manage_devices_confirm_removal_description_line1, displayName())
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/NegativeConfirmationDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/NegativeConfirmationDialog.kt
index 927d241038..5337f9a213 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/NegativeConfirmationDialog.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/NegativeConfirmationDialog.kt
@@ -16,6 +16,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
+import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.TextStyle
@@ -56,6 +57,7 @@ private fun PreviewDeleteConfirmationDialogError() {
fun NegativeConfirmationDialog(
message: String,
messageStyle: TextStyle? = null,
+ messageColor: Color? = null,
errorMessage: String? = null,
confirmationText: String = stringResource(id = R.string.delete),
cancelText: String = stringResource(id = R.string.cancel),
@@ -65,6 +67,7 @@ fun NegativeConfirmationDialog(
NegativeConfirmationDialog(
message = AnnotatedString(message),
messageStyle = messageStyle,
+ messageColor = messageColor,
errorMessage = errorMessage,
confirmationText = confirmationText,
cancelText = cancelText,
@@ -77,6 +80,7 @@ fun NegativeConfirmationDialog(
fun NegativeConfirmationDialog(
message: AnnotatedString,
messageStyle: TextStyle? = null,
+ messageColor: Color? = null,
errorMessage: String? = null,
confirmationText: String = stringResource(id = R.string.delete),
cancelText: String = stringResource(id = R.string.cancel),
@@ -95,7 +99,11 @@ fun NegativeConfirmationDialog(
},
title = {
Column(horizontalAlignment = Alignment.CenterHorizontally) {
- Text(text = message, style = messageStyle ?: LocalTextStyle.current)
+ Text(
+ text = message,
+ style = messageStyle ?: LocalTextStyle.current,
+ color = messageColor ?: LocalTextStyle.current.color,
+ )
if (errorMessage != null) {
Text(
text = errorMessage,
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/RedeemVoucherDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/RedeemVoucherDialog.kt
index e0a5e05011..cd7d21b95f 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/RedeemVoucherDialog.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/RedeemVoucherDialog.kt
@@ -224,7 +224,7 @@ private fun RedeemSuccessBody(message: String) {
Modifier.padding(start = Dimens.smallPadding, top = Dimens.cellTopPadding)
.fillMaxWidth(),
color = MaterialTheme.colorScheme.onSurfaceVariant,
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.labelLarge,
)
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/RemoveDeviceConfirmationDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/RemoveDeviceConfirmationDialog.kt
index 867f614699..ed3c104e51 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/RemoveDeviceConfirmationDialog.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/RemoveDeviceConfirmationDialog.kt
@@ -3,6 +3,7 @@ package net.mullvad.mullvadvpn.compose.dialog
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.res.stringResource
+import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter
@@ -36,10 +37,17 @@ fun RemoveDeviceConfirmation(navigator: ResultBackNavigator<DeviceId>, device: D
textResource(id = R.string.max_devices_confirm_removal_description, device.displayName())
val message =
HtmlCompat.fromHtml(htmlFormattedString, HtmlCompat.FROM_HTML_MODE_COMPACT)
- .toAnnotatedString(boldFontWeight = FontWeight.Bold)
+ .toAnnotatedString(
+ boldSpanStyle =
+ SpanStyle(
+ color = MaterialTheme.colorScheme.onSurface,
+ fontWeight = FontWeight.Bold,
+ )
+ )
NegativeConfirmationDialog(
message = message,
- messageStyle = MaterialTheme.typography.labelLarge,
+ messageStyle = MaterialTheme.typography.bodyMedium,
+ messageColor = MaterialTheme.colorScheme.onSurfaceVariant,
confirmationText = stringResource(id = R.string.confirm_removal),
cancelText = stringResource(id = R.string.back),
onBack = dropUnlessResumed { navigator.navigateBack() },
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/ReportProblemNoEmailDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/ReportProblemNoEmailDialog.kt
index 2c01c3f436..be32eace1e 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/ReportProblemNoEmailDialog.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/ReportProblemNoEmailDialog.kt
@@ -26,7 +26,8 @@ fun ReportProblemNoEmail(resultBackNavigator: ResultBackNavigator<Boolean>) {
message = stringResource(id = R.string.confirm_no_email),
confirmationText = stringResource(id = R.string.send_anyway),
cancelText = stringResource(id = R.string.back),
- messageStyle = MaterialTheme.typography.bodySmall,
+ messageStyle = MaterialTheme.typography.labelLarge,
+ messageColor = MaterialTheme.colorScheme.onSurfaceVariant,
onBack = dropUnlessResumed { resultBackNavigator.navigateBack() },
onConfirm = dropUnlessResumed { resultBackNavigator.navigateBack(result = true) },
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/ResetServerIpOverridesConfirmationDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/ResetServerIpOverridesConfirmationDialog.kt
index 1090db2f09..950af0c9f9 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/ResetServerIpOverridesConfirmationDialog.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/ResetServerIpOverridesConfirmationDialog.kt
@@ -80,8 +80,8 @@ fun ResetServerIpOverridesConfirmationDialog(
text = {
Text(
text = stringResource(id = R.string.server_ip_overrides_reset_body),
- color = MaterialTheme.colorScheme.onSurface,
- style = MaterialTheme.typography.bodySmall,
+ color = MaterialTheme.colorScheme.onSurfaceVariant,
+ style = MaterialTheme.typography.labelLarge,
)
},
onDismissRequest = onNavigateBack,
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/SaveApiAccessMethodDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/SaveApiAccessMethodDialog.kt
index 528956286c..d9e649883c 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/SaveApiAccessMethodDialog.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/SaveApiAccessMethodDialog.kt
@@ -102,8 +102,8 @@ fun SaveApiAccessMethodDialog(
)
}
},
- title = {
- Text(text = state.descriptionText(), style = MaterialTheme.typography.headlineSmall)
+ text = {
+ Text(text = state.descriptionText(), style = MaterialTheme.typography.labelLarge)
},
onDismissRequest = { /*Should not be able to dismiss*/ },
confirmButton = {
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/info/InfoDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/info/InfoDialog.kt
index 30e4ebcc87..1cb4bccbed 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/info/InfoDialog.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/info/InfoDialog.kt
@@ -66,8 +66,8 @@ fun InfoDialog(message: String, additionalInfo: String? = null, onDismiss: () ->
) {
Text(
text = message,
- color = MaterialTheme.colorScheme.onSurface,
- style = MaterialTheme.typography.bodySmall,
+ color = MaterialTheme.colorScheme.onSurfaceVariant,
+ style = MaterialTheme.typography.labelLarge,
modifier = Modifier.fillMaxWidth(),
)
if (additionalInfo != null) {
@@ -79,8 +79,8 @@ fun InfoDialog(message: String, additionalInfo: String? = null, onDismiss: () ->
val trimmed = annotated.substring(0, annotated.trimEnd().length)
Text(
text = trimmed,
- color = MaterialTheme.colorScheme.onSurface,
- style = MaterialTheme.typography.bodySmall,
+ color = MaterialTheme.colorScheme.onSurfaceVariant,
+ style = MaterialTheme.typography.labelLarge,
modifier = Modifier.fillMaxWidth(),
)
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/payment/VerificationPendingDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/payment/VerificationPendingDialog.kt
index 0e3f77f6dc..d89fc7dbcc 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/payment/VerificationPendingDialog.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/payment/VerificationPendingDialog.kt
@@ -31,16 +31,11 @@ fun VerificationPending(navigator: DestinationsNavigator) {
fun VerificationPendingDialog(onClose: () -> Unit) {
AlertDialog(
icon = {}, // Makes it look a bit more balanced
- title = {
- Text(
- text = stringResource(id = R.string.verifying_purchase),
- style = MaterialTheme.typography.headlineSmall,
- )
- },
+ title = { Text(text = stringResource(id = R.string.verifying_purchase)) },
text = {
Text(
text = stringResource(id = R.string.payment_pending_dialog_message),
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.labelLarge,
)
},
containerColor = MaterialTheme.colorScheme.surface,
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AccountScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AccountScreen.kt
index b7ce1ca5d4..6643012d33 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AccountScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AccountScreen.kt
@@ -212,7 +212,7 @@ fun AccountScreen(
private fun DeviceNameRow(deviceName: String, onManageDevicesClick: () -> Unit) {
Column(modifier = Modifier.fillMaxWidth()) {
Text(
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.labelLarge,
text = stringResource(id = R.string.device_name),
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
@@ -234,7 +234,7 @@ private fun DeviceNameRow(deviceName: String, onManageDevicesClick: () -> Unit)
private fun AccountNumberRow(accountNumber: String, onCopyAccountNumber: (String) -> Unit) {
Column(modifier = Modifier.fillMaxWidth()) {
Text(
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.labelLarge,
text = stringResource(id = R.string.account_number),
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
@@ -255,7 +255,7 @@ private fun PaidUntilRow(
) {
Column(modifier = Modifier.fillMaxWidth()) {
Text(
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.labelLarge,
text = stringResource(id = R.string.paid_until),
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ApiAccessListScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ApiAccessListScreen.kt
index 393dc0c77f..22c34514fb 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ApiAccessListScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ApiAccessListScreen.kt
@@ -106,10 +106,10 @@ private fun LazyListScope.description() {
item {
Text(
text = stringResource(id = R.string.api_access_description),
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier =
- Modifier.padding(start = Dimens.cellStartPadding, end = Dimens.cellEndPadding)
+ Modifier.padding(start = Dimens.mediumPadding, end = Dimens.mediumPadding)
.fillMaxWidth(),
)
}
@@ -123,8 +123,8 @@ private fun LazyListScope.currentAccessMethod(
Row(
modifier =
Modifier.padding(
- start = Dimens.sideMargin,
- end = Dimens.sideMargin,
+ start = Dimens.mediumPadding,
+ end = Dimens.mediumPadding,
bottom = Dimens.mediumPadding,
),
verticalAlignment = Alignment.CenterVertically,
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AppInfoScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AppInfoScreen.kt
index c83f2c84fe..535e148096 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AppInfoScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AppInfoScreen.kt
@@ -154,7 +154,7 @@ private fun AppVersionRow(state: AppInfoUiState, openAppListing: () -> Unit) {
if (!state.version.isSupported) {
Text(
text = stringResource(id = R.string.unsupported_version_description),
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier =
Modifier.fillMaxWidth()
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AutoConnectAndLockdownModeScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AutoConnectAndLockdownModeScreen.kt
index a0b997d0c9..731f5ca7f8 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AutoConnectAndLockdownModeScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AutoConnectAndLockdownModeScreen.kt
@@ -197,7 +197,7 @@ private fun ConstraintLayoutScope.AutoConnectCarousel(
Text(
modifier = Modifier.padding(horizontal = Dimens.largePadding),
style =
- MaterialTheme.typography.titleMedium.copy(
+ MaterialTheme.typography.labelLarge.copy(
color = MaterialTheme.colorScheme.onSurfaceVariant
),
text = annotatedTopText,
@@ -210,7 +210,7 @@ private fun ConstraintLayoutScope.AutoConnectCarousel(
)
Text(
modifier = Modifier.padding(horizontal = Dimens.largePadding),
- style = MaterialTheme.typography.titleMedium,
+ style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant,
text =
HtmlCompat.fromHtml(
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ChangelogScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ChangelogScreen.kt
index 61ef8f8611..2ae10213ab 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ChangelogScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ChangelogScreen.kt
@@ -77,14 +77,14 @@ fun ChangelogScreen(state: ChangelogUiState, onBackClick: () -> Unit) {
) {
Text(
text = state.version,
- style = MaterialTheme.typography.titleLarge,
+ style = MaterialTheme.typography.headlineSmall,
color = MaterialTheme.colorScheme.onSurface,
)
if (state.changes.isEmpty()) {
Text(
text = stringResource(R.string.changelog_empty),
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
} else {
@@ -101,14 +101,14 @@ private fun ChangeListItem(text: String) {
Row {
Text(
text = "•",
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.width(Dimens.buttonSpacing),
textAlign = TextAlign.Center,
)
Text(
text = text,
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreen.kt
index 3533cde305..878ab70d9d 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreen.kt
@@ -127,8 +127,6 @@ import net.mullvad.mullvadvpn.lib.theme.color.Alpha80
import net.mullvad.mullvadvpn.lib.theme.color.AlphaInvisible
import net.mullvad.mullvadvpn.lib.theme.color.AlphaScrollbar
import net.mullvad.mullvadvpn.lib.theme.color.AlphaVisible
-import net.mullvad.mullvadvpn.lib.theme.typeface.connectionStatus
-import net.mullvad.mullvadvpn.lib.theme.typeface.hostname
import net.mullvad.mullvadvpn.lib.tv.NavigationDrawerTv
import net.mullvad.mullvadvpn.lib.ui.tag.CONNECT_BUTTON_TEST_TAG
import net.mullvad.mullvadvpn.lib.ui.tag.CONNECT_CARD_HEADER_TEST_TAG
@@ -590,7 +588,7 @@ private fun ConnectionCardHeader(
Text(
modifier = Modifier.fillMaxWidth().padding(top = Dimens.tinyPadding),
text = location.asString(),
- style = MaterialTheme.typography.connectionStatus,
+ style = MaterialTheme.typography.titleLarge,
color = MaterialTheme.colorScheme.onSurface,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
@@ -601,7 +599,7 @@ private fun ConnectionCardHeader(
Text(
modifier = Modifier.fillMaxWidth(),
text = it,
- style = MaterialTheme.typography.hostname,
+ style = MaterialTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListLocationsScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListLocationsScreen.kt
index 5e302c6990..1e81231e7d 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListLocationsScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListLocationsScreen.kt
@@ -205,7 +205,7 @@ private fun Actions(isSaveEnabled: Boolean, onSaveClick: () -> Unit) {
.copy(contentColor = MaterialTheme.colorScheme.onPrimary),
modifier = Modifier.testTag(SAVE_BUTTON_TEST_TAG),
) {
- Text(text = stringResource(R.string.save))
+ Text(text = stringResource(R.string.save), style = MaterialTheme.typography.labelLarge)
}
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListsScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListsScreen.kt
index 3d50800137..32cc2608f6 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListsScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListsScreen.kt
@@ -169,6 +169,7 @@ private fun LazyListScope.content(
NavigationComposeCell(
title = customList.name.value,
onClick = { openCustomList(customList) },
+ textStyle = MaterialTheme.typography.bodyLarge,
)
}
}
@@ -178,7 +179,7 @@ private fun LazyListScope.empty() {
Text(
text = stringResource(R.string.no_custom_lists_available),
modifier = Modifier.padding(Dimens.mediumPadding),
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/DaitaScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/DaitaScreen.kt
index bbe92e5346..ffa4afbd9a 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/DaitaScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/DaitaScreen.kt
@@ -187,6 +187,7 @@ private fun DescriptionText(
) {
SwitchComposeSubtitleCell(
modifier = Modifier.padding(vertical = Dimens.smallPadding),
+ style = MaterialTheme.typography.labelLarge,
text =
buildString {
appendLine(firstParagraph)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/DeviceListScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/DeviceListScreen.kt
index f711938bca..a4ad010775 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/DeviceListScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/DeviceListScreen.kt
@@ -180,6 +180,7 @@ private fun ColumnScope.DeviceListError(tryAgain: () -> Unit) {
Text(
text = stringResource(id = R.string.failed_to_fetch_devices),
modifier = Modifier.padding(Dimens.smallPadding).align(Alignment.CenterHorizontally),
+ style = MaterialTheme.typography.bodyMedium,
)
PrimaryButton(
onClick = tryAgain,
@@ -269,7 +270,7 @@ private fun ColumnScope.DeviceListHeader(state: DeviceListUiState) {
R.string.max_devices_resolved_description
}
),
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurface,
modifier =
Modifier.wrapContentHeight()
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/DeviceRevokedScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/DeviceRevokedScreen.kt
index 4ab0fba693..9baca47b00 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/DeviceRevokedScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/DeviceRevokedScreen.kt
@@ -119,13 +119,13 @@ fun DeviceRevokedScreen(
)
Text(
text = stringResource(id = R.string.device_inactive_title),
- style = MaterialTheme.typography.headlineLarge,
+ style = MaterialTheme.typography.headlineSmall,
color = MaterialTheme.colorScheme.onSurface,
)
Text(
text = stringResource(id = R.string.device_inactive_description),
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier.padding(top = Dimens.smallPadding),
)
@@ -133,7 +133,7 @@ fun DeviceRevokedScreen(
if (state == DeviceRevokedUiState.SECURED) {
Text(
text = stringResource(id = R.string.device_inactive_unblock_warning),
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier.padding(top = Dimens.mediumPadding),
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/EditApiAccessMethodScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/EditApiAccessMethodScreen.kt
index 1c0a84c375..3b4ead576e 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/EditApiAccessMethodScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/EditApiAccessMethodScreen.kt
@@ -10,6 +10,7 @@ import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Check
+import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.SnackbarDuration
@@ -30,6 +31,7 @@ import androidx.compose.ui.text.input.KeyboardCapitalization
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter
+import androidx.compose.ui.unit.Dp.Companion.Hairline
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.annotation.RootGraph
@@ -323,12 +325,15 @@ private fun ApiAccessMethodTypeSelection(
title = formData.apiAccessMethodTypes.text(),
colors = apiAccessTextFieldColors(),
) { close ->
- ApiAccessMethodTypes.entries.forEach {
+ ApiAccessMethodTypes.entries.forEachIndexed { index, item ->
+ if (index > 0) {
+ HorizontalDivider(color = MaterialTheme.colorScheme.surface, thickness = Hairline)
+ }
MullvadDropdownMenuItem(
- text = it.text(),
+ text = item.text(),
onClick = {
close()
- onTypeSelected(it)
+ onTypeSelected(item)
},
content = {
Icon(
@@ -337,7 +342,7 @@ private fun ApiAccessMethodTypeSelection(
modifier =
Modifier.padding(end = Dimens.selectableCellTextMargin)
.alpha(
- if (it == formData.apiAccessMethodTypes) AlphaVisible
+ if (item == formData.apiAccessMethodTypes) AlphaVisible
else AlphaInvisible
),
)
@@ -500,12 +505,15 @@ private fun CipherSelection(cipher: Cipher, onCipherChange: (Cipher) -> Unit) {
title = cipher.label,
colors = apiAccessTextFieldColors(),
) { close ->
- Cipher.listAll().forEach {
+ Cipher.listAll().forEachIndexed { index, item ->
+ if (index > 0) {
+ HorizontalDivider(color = MaterialTheme.colorScheme.surface, thickness = Hairline)
+ }
MullvadDropdownMenuItem(
- text = it.label,
+ text = item.label,
onClick = {
close()
- onCipherChange(it)
+ onCipherChange(item)
},
content = {
Icon(
@@ -513,7 +521,7 @@ private fun CipherSelection(cipher: Cipher, onCipherChange: (Cipher) -> Unit) {
contentDescription = null,
modifier =
Modifier.padding(end = Dimens.selectableCellTextMargin)
- .alpha(if (it == cipher) AlphaVisible else AlphaInvisible),
+ .alpha(if (item == cipher) AlphaVisible else AlphaInvisible),
)
},
)
@@ -556,6 +564,7 @@ private fun EnableAuthentication(
)
},
)
+ HorizontalDivider(color = MaterialTheme.colorScheme.surface, thickness = Hairline)
MullvadDropdownMenuItem(
text = stringResource(id = R.string.off),
onClick = {
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/EditCustomListScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/EditCustomListScreen.kt
index 5814e9b377..5c7ff4642a 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/EditCustomListScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/EditCustomListScreen.kt
@@ -135,7 +135,11 @@ fun EditCustomListScreen(
)
},
) { modifier: Modifier ->
- SpacedColumn(modifier = modifier, alignment = Alignment.Top) {
+ SpacedColumn(
+ modifier = modifier,
+ verticalAlignment = Alignment.Top,
+ horizontalAlignment = Alignment.CenterHorizontally,
+ ) {
when (state) {
EditCustomListUiState.Loading -> {
MullvadCircularProgressIndicatorLarge()
@@ -144,8 +148,8 @@ fun EditCustomListScreen(
Text(
text = stringResource(id = R.string.not_found),
modifier = Modifier.padding(Dimens.sideMargin),
- style = MaterialTheme.typography.labelMedium,
- color = MaterialTheme.colorScheme.onSurface,
+ style = MaterialTheme.typography.bodyMedium,
+ color = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
is EditCustomListUiState.Content -> {
@@ -153,6 +157,9 @@ fun EditCustomListScreen(
TwoRowCell(
titleText = stringResource(id = R.string.list_name),
subtitleText = state.name.value,
+ titleStyle = MaterialTheme.typography.bodyLarge,
+ subtitleStyle = MaterialTheme.typography.bodyMedium,
+ subtitleColor = MaterialTheme.colorScheme.onPrimary,
onCellClicked = { onNameClicked(state.id, state.name) },
)
// Locations cell
@@ -164,6 +171,9 @@ fun EditCustomListScreen(
state.locations.size,
state.locations.size,
),
+ titleStyle = MaterialTheme.typography.bodyLarge,
+ subtitleStyle = MaterialTheme.typography.bodyMedium,
+ subtitleColor = MaterialTheme.colorScheme.onPrimary,
onCellClicked = { onLocationsClicked(state.id) },
)
}
@@ -187,7 +197,12 @@ private fun Actions(enabled: Boolean, onDeleteList: () -> Unit) {
modifier = Modifier.background(MaterialTheme.colorScheme.surfaceContainer),
) {
DropdownMenuItem(
- text = { Text(text = stringResource(id = R.string.delete_list)) },
+ text = {
+ Text(
+ text = stringResource(id = R.string.delete_list),
+ style = MaterialTheme.typography.bodyLarge,
+ )
+ },
leadingIcon = {
Icon(
imageVector = Icons.Default.Delete,
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/LoginScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/LoginScreen.kt
index d07fad359f..7a73cb16e4 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/LoginScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/LoginScreen.kt
@@ -248,7 +248,7 @@ private fun ColumnScope.LoginInput(
Text(
modifier = Modifier.padding(bottom = Dimens.smallPadding),
text = state.loginState.supportingText() ?: "",
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.labelLarge,
color =
if (state.loginState.isError()) {
MaterialTheme.colorScheme.error
@@ -404,7 +404,11 @@ private fun AccountDropDownItem(
.padding(horizontal = Dimens.mediumPadding, vertical = Dimens.smallPadding),
contentAlignment = Alignment.CenterStart,
) {
- Text(text = accountNumber, overflow = TextOverflow.Clip)
+ Text(
+ text = accountNumber,
+ overflow = TextOverflow.Clip,
+ style = MaterialTheme.typography.bodyLarge,
+ )
}
IconButton(enabled = enabled, onClick = onDeleteClick) {
Icon(
@@ -425,6 +429,7 @@ private fun CreateAccountPanel(onCreateAccountClick: () -> Unit, isEnabled: Bool
) {
Text(
modifier = Modifier.padding(bottom = Dimens.smallPadding),
+ style = MaterialTheme.typography.bodyMedium,
text = stringResource(id = R.string.dont_have_an_account),
color = MaterialTheme.colorScheme.onBackground,
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ManageDevicesScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ManageDevicesScreen.kt
index dc36921b9a..d7ab455f09 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ManageDevicesScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ManageDevicesScreen.kt
@@ -135,6 +135,7 @@ private fun Content(
Column(modifier) {
BaseSubtitleCell(
text = stringResource(R.string.manage_devices_description),
+ style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
ManageDevicesItems(
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/MultihopScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/MultihopScreen.kt
index 5ef028e15f..ba5f854f03 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/MultihopScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/MultihopScreen.kt
@@ -11,6 +11,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.widthIn
+import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
@@ -113,6 +114,7 @@ fun MultihopScreen(
private fun Description() {
SwitchComposeSubtitleCell(
modifier = Modifier.padding(vertical = Dimens.mediumPadding),
+ style = MaterialTheme.typography.labelLarge,
text = stringResource(R.string.multihop_description),
)
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/OutOfTimeScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/OutOfTimeScreen.kt
index 6173f1ada9..08d97019e4 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/OutOfTimeScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/OutOfTimeScreen.kt
@@ -190,7 +190,7 @@ private fun ColumnScope.Content(showSitePayment: Boolean) {
)
Text(
text = stringResource(id = R.string.out_of_time),
- style = MaterialTheme.typography.headlineLarge,
+ style = MaterialTheme.typography.headlineSmall,
color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier.testTag(OUT_OF_TIME_SCREEN_TITLE_TEST_TAG),
)
@@ -203,7 +203,7 @@ private fun ColumnScope.Content(showSitePayment: Boolean) {
append(stringResource(R.string.add_time_to_account))
}
},
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier.padding(top = Dimens.mediumPadding),
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/PrivacyDisclaimerScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/PrivacyDisclaimerScreen.kt
index 2d17a02fbc..85f9e893c0 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/PrivacyDisclaimerScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/PrivacyDisclaimerScreen.kt
@@ -147,7 +147,7 @@ private fun Content(isPlayBuild: Boolean) {
Text(
text = stringResource(id = R.string.privacy_disclaimer_body_first_paragraph),
color = MaterialTheme.colorScheme.onSurface,
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.bodyMedium,
)
Spacer(modifier = Modifier.height(Dimens.cellVerticalSpacing))
@@ -155,7 +155,7 @@ private fun Content(isPlayBuild: Boolean) {
Text(
text = stringResource(id = R.string.privacy_disclaimer_body_second_paragraph),
color = MaterialTheme.colorScheme.onSurface,
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.bodyMedium,
)
Spacer(modifier = Modifier.height(Dimens.cellVerticalSpacing))
@@ -164,7 +164,7 @@ private fun Content(isPlayBuild: Boolean) {
Text(
text = buildPrivacyPolicyAnnotatedString(isPlayBuild),
modifier = Modifier.padding(end = Dimens.miniPadding),
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.bodyMedium,
)
Icon(
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ReportProblemScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ReportProblemScreen.kt
index 207e5cfc26..ddb6bdcaf6 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ReportProblemScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ReportProblemScreen.kt
@@ -162,6 +162,7 @@ private fun ReportProblemScreen(
Text(
text = stringResource(id = R.string.problem_report_description),
color = MaterialTheme.colorScheme.onSurfaceVariant,
+ style = MaterialTheme.typography.labelLarge,
)
TextField(
@@ -245,7 +246,7 @@ private fun ColumnScope.SendingContent() {
Spacer(modifier = Modifier.height(Dimens.mediumSpacer))
Text(
text = stringResource(id = R.string.sending),
- style = MaterialTheme.typography.headlineLarge,
+ style = MaterialTheme.typography.headlineSmall,
color = MaterialTheme.colorScheme.onSurface,
)
}
@@ -263,7 +264,7 @@ private fun ColumnScope.SentContent(sendingState: SendingReportUiState.Success)
Spacer(modifier = Modifier.height(Dimens.mediumSpacer))
Text(
text = stringResource(id = R.string.sent),
- style = MaterialTheme.typography.headlineLarge,
+ style = MaterialTheme.typography.headlineSmall,
color = MaterialTheme.colorScheme.onSurface,
)
Text(
@@ -277,7 +278,7 @@ private fun ColumnScope.SentContent(sendingState: SendingReportUiState.Success)
append(stringResource(id = R.string.we_will_look_into_this))
}
},
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.bodyMedium,
modifier = Modifier.fillMaxWidth(),
)
@@ -298,7 +299,7 @@ private fun ColumnScope.SentContent(sendingState: SendingReportUiState.Success)
Text(
text = annotatedEmailString,
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier.fillMaxWidth(),
)
@@ -316,12 +317,12 @@ private fun ColumnScope.ErrorContent(retry: () -> Unit, onDismiss: () -> Unit) {
Spacer(modifier = Modifier.height(Dimens.mediumSpacer))
Text(
text = stringResource(id = R.string.failed_to_send),
- style = MaterialTheme.typography.headlineLarge,
+ style = MaterialTheme.typography.headlineSmall,
color = MaterialTheme.colorScheme.onSurface,
)
Text(
text = stringResource(id = R.string.failed_to_send_details),
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier.fillMaxWidth(),
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ServerIpOverridesScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ServerIpOverridesScreen.kt
index c0164483e9..a7355a0676 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ServerIpOverridesScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ServerIpOverridesScreen.kt
@@ -314,7 +314,7 @@ private fun ImportOverridesByBottomSheet(
),
text = stringResource(R.string.import_overrides_bottom_sheet_override_warning),
maxLines = 2,
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.labelLarge,
overflow = TextOverflow.Ellipsis,
)
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ShadowsocksSettingsScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ShadowsocksSettingsScreen.kt
index 5f6de5f7d9..fcd6603941 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ShadowsocksSettingsScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ShadowsocksSettingsScreen.kt
@@ -103,8 +103,8 @@ fun ShadowsocksSettingsScreen(
testTag = SHADOWSOCKS_PORT_ITEM_AUTOMATIC_TEST_TAG,
)
}
- itemWithDivider {
- SHADOWSOCKS_PRESET_PORTS.forEach { port ->
+ SHADOWSOCKS_PRESET_PORTS.forEach { port ->
+ itemWithDivider {
SelectableCell(
title = port.toString(),
isSelected = state.port.getOrNull() == port,
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SplitTunnelingScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SplitTunnelingScreen.kt
index ec551ad39f..1e3a2766ec 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SplitTunnelingScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SplitTunnelingScreen.kt
@@ -173,7 +173,8 @@ private fun LazyListScope.description() {
buildString {
appendLine(stringResource(id = R.string.split_tunneling_description))
append(stringResource(id = R.string.split_tunneling_description_warning))
- }
+ },
+ style = MaterialTheme.typography.labelLarge,
)
}
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/Udp2TcpSettingsScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/Udp2TcpSettingsScreen.kt
index a2736de12f..9f8499b31f 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/Udp2TcpSettingsScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/Udp2TcpSettingsScreen.kt
@@ -77,8 +77,8 @@ fun Udp2TcpSettingsScreen(
testTag = UDP_OVER_TCP_PORT_ITEM_AUTOMATIC_TEST_TAG,
)
}
- itemWithDivider {
- UDP2TCP_PRESET_PORTS.forEach { port ->
+ UDP2TCP_PRESET_PORTS.forEach { port ->
+ itemWithDivider {
SelectableCell(
title = port.toString(),
isSelected = state.port.getOrNull() == port,
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/VpnSettingsScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/VpnSettingsScreen.kt
index 499dbc620a..22ab30ff03 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/VpnSettingsScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/VpnSettingsScreen.kt
@@ -560,6 +560,7 @@ fun VpnSettingsContent(
Text(
text = stringResource(id = R.string.add_a_server),
color = MaterialTheme.colorScheme.onSurface,
+ style = MaterialTheme.typography.bodyLarge,
)
},
bodyView = {},
@@ -583,7 +584,7 @@ fun VpnSettingsContent(
item(key = it::class.simpleName) {
BaseSubtitleCell(
text = textResource(id = R.string.custom_dns_footer),
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.animateItem(),
)
@@ -608,7 +609,7 @@ fun VpnSettingsContent(
id = R.string.custom_dns_disable_mode_subtitle,
textResource(id = R.string.dns_content_blockers),
),
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.animateItem(),
)
@@ -971,7 +972,7 @@ fun VpnSettingsContent(
id = R.string.wg_port_subtitle,
stringResource(R.string.wireguard),
),
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.animateItem(),
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/WelcomeScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/WelcomeScreen.kt
index 3cd23d447d..8bac939db8 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/WelcomeScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/WelcomeScreen.kt
@@ -229,7 +229,7 @@ private fun WelcomeInfo(
modifier =
Modifier.fillMaxWidth()
.padding(horizontal = Dimens.sideMargin, vertical = Dimens.smallPadding),
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.onSurface,
)
@@ -261,12 +261,12 @@ private fun WelcomeInfo(
},
modifier =
Modifier.padding(
- top = Dimens.smallPadding,
+ top = Dimens.cellVerticalSpacing,
bottom = Dimens.verticalSpace,
start = Dimens.sideMargin,
end = Dimens.sideMargin,
),
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.onSurface,
)
}
@@ -287,11 +287,16 @@ private fun AccountNumberRow(snackbarHostState: SnackbarHostState, state: Welcom
modifier =
Modifier.fillMaxWidth()
.clickable(onClick = onCopyToClipboard)
- .padding(horizontal = Dimens.sideMargin),
+ .padding(
+ start = Dimens.sideMargin,
+ end = Dimens.sideMargin,
+ top = Dimens.cellVerticalSpacing,
+ bottom = Dimens.mediumPadding,
+ ),
) {
Text(
text = state.accountNumber?.value?.groupWithSpaces() ?: "",
- modifier = Modifier.weight(1f).padding(top = Dimens.smallPadding),
+ modifier = Modifier.weight(1f),
style = MaterialTheme.typography.headlineSmall,
color = MaterialTheme.colorScheme.onSurface,
)
@@ -314,7 +319,7 @@ fun DeviceNameRow(deviceName: String?, navigateToDeviceInfoDialog: () -> Unit) {
append(": ")
append(deviceName)
},
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.labelLarge,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
color = MaterialTheme.colorScheme.onSurface,
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SearchLocationScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SearchLocationScreen.kt
index 785739dc61..f095160107 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SearchLocationScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SearchLocationScreen.kt
@@ -414,7 +414,7 @@ private fun Title(text: String, onBackgroundColor: Color) {
modifier =
Modifier.fillMaxWidth()
.padding(horizontal = Dimens.sideMargin, vertical = Dimens.smallPadding),
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.labelLarge,
)
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SelectLocationList.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SelectLocationList.kt
index d42177dbac..bf3db9a534 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SelectLocationList.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SelectLocationList.kt
@@ -115,7 +115,7 @@ private fun LazyListScope.entryBlocked(openDaitaSettings: () -> Unit) {
stringResource(id = R.string.daita),
stringResource(R.string.direct_only),
),
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.labelLarge,
textAlign = TextAlign.Center,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(horizontal = Dimens.mediumPadding),
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/textfield/CustomTextField.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/textfield/CustomTextField.kt
index c00be63ac2..783948978d 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/textfield/CustomTextField.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/textfield/CustomTextField.kt
@@ -122,7 +122,7 @@ fun ErrorSupportingText(text: String) {
)
Text(
text = text,
- color = MaterialTheme.colorScheme.onSecondary,
+ color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.bodySmall,
modifier = Modifier.padding(horizontal = Dimens.smallPadding),
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/textfield/SearchTextField.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/textfield/SearchTextField.kt
index f8c45bd6b0..1c2c23bf41 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/textfield/SearchTextField.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/textfield/SearchTextField.kt
@@ -63,7 +63,7 @@ fun SearchTextField(
BasicTextField(
value = searchTerm,
- textStyle = MaterialTheme.typography.labelLarge.copy(color = textColor),
+ textStyle = MaterialTheme.typography.bodyLarge.copy(color = textColor),
onValueChange = { text: String ->
searchTerm = text
onValueChange.invoke(text)
@@ -92,7 +92,7 @@ fun SearchTextField(
)
},
placeholder = {
- Text(text = placeHolder, style = MaterialTheme.typography.labelLarge)
+ Text(text = placeHolder, style = MaterialTheme.typography.bodyLarge)
},
trailingIcon = {
if (searchTerm.isNotEmpty()) {
diff --git a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Theme.kt b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Theme.kt
index 3625c8ed0a..3257ea2d5b 100644
--- a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Theme.kt
+++ b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Theme.kt
@@ -7,49 +7,17 @@ import androidx.compose.material3.LocalRippleConfiguration
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.RippleConfiguration
import androidx.compose.material3.Shapes
-import androidx.compose.material3.Typography
import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.remember
import androidx.compose.runtime.staticCompositionLocalOf
-import androidx.compose.ui.text.TextStyle
-import androidx.compose.ui.text.font.FontFamily
-import androidx.compose.ui.text.font.FontWeight
-import androidx.compose.ui.unit.TextUnit
import androidx.compose.ui.unit.dp
import net.mullvad.mullvadvpn.lib.theme.color.ColorDarkTokens
import net.mullvad.mullvadvpn.lib.theme.color.ColorLightTokens
import net.mullvad.mullvadvpn.lib.theme.dimensions.Dimensions
import net.mullvad.mullvadvpn.lib.theme.dimensions.defaultDimensions
-import net.mullvad.mullvadvpn.lib.theme.typeface.TypeScale
-
-// Add our own definitions here
-private val MullvadTypography =
- Typography(
- headlineLarge = TextStyle(fontSize = TypeScale.TextHuge, fontWeight = FontWeight.Bold),
- headlineMedium =
- TextStyle(
- fontWeight = FontWeight.Bold,
- fontSize = TypeScale.TextHeadline,
- lineHeight = TypeScale.HeadlineMediumLineHeight,
- ),
- headlineSmall = TextStyle(fontSize = TypeScale.TextBig, fontWeight = FontWeight.Bold),
- bodySmall =
- TextStyle(fontSize = TypeScale.TextSmall, lineHeight = TypeScale.TextMediumPlus),
- titleSmall = TextStyle(fontSize = TypeScale.TextMedium, fontWeight = FontWeight.SemiBold),
- titleMedium =
- TextStyle(fontSize = TypeScale.TextMediumPlus, fontWeight = FontWeight.SemiBold),
- titleLarge = TextStyle(fontSize = TypeScale.TitleLarge, fontFamily = FontFamily.SansSerif),
- labelMedium = TextStyle(fontSize = TypeScale.TextSmall, fontWeight = FontWeight.SemiBold),
- labelLarge =
- TextStyle(
- fontWeight = FontWeight.Normal,
- letterSpacing = TextUnit.Unspecified,
- fontSize = TypeScale.TextMedium,
- ),
- )
private val lightColorScheme =
lightColorScheme(
@@ -168,7 +136,7 @@ private val LocalAppDimens = staticCompositionLocalOf { defaultDimensions }
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun AppTheme(content: @Composable () -> Unit) {
- val typography = MullvadTypography
+ val typography = MullvadMaterial3Typography
// Set dimensions and type scale based on configurations here
val dimensions = defaultDimensions
diff --git a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Type.kt b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Type.kt
index 848e375e1c..76b24c1327 100644
--- a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Type.kt
+++ b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Type.kt
@@ -1,33 +1,26 @@
package net.mullvad.mullvadvpn.lib.theme
import androidx.compose.material3.Typography
-import androidx.compose.ui.text.TextStyle
-import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
-import androidx.compose.ui.unit.sp
+
+/*
+The app currently uses the following text styles directly in the code:
+headlineLarge (32sp 700 weight) -> Used for title in PrivacyDisclaimer, Welcome and Login
+headlineSmall (24sp 600 weight) -> Used for title in OutOfTime, DeviceRevoked, ReportAProblem etc
+titleLarge (22sp 600 weight) -> Used for Connection status and location
+titleMedium (16sp 600 weight) -> Used for cell header text and button text
+bodyLarge (16sp 400 weight) -> Used for title in two row cells and some other non-standard cells
+bodyMedium (14sp 400 weight) -> Used for descriptions in screens and descriptions for cells
+bodySmall (12sp 400 weight) -> Disclaimer texts and error texts under inputs
+labelLarge (14sp 500 weight) -> Cell that are not header cells, Dialog texts, device name and expiry
+ */
internal val MullvadMaterial3Typography =
- Typography(
- displayLarge = TextStyle(fontFamily = FontFamily.SansSerif),
- displayMedium = TextStyle(fontFamily = FontFamily.SansSerif),
- displaySmall = TextStyle(fontFamily = FontFamily.SansSerif),
- headlineLarge = TextStyle(fontFamily = FontFamily.SansSerif, fontWeight = FontWeight.Black),
- headlineMedium = TextStyle(fontFamily = FontFamily.SansSerif),
- headlineSmall = TextStyle(fontFamily = FontFamily.SansSerif, fontWeight = FontWeight.Black),
- titleLarge = TextStyle(fontFamily = FontFamily.SansSerif, fontWeight = FontWeight.Black),
- titleMedium = TextStyle(fontFamily = FontFamily.SansSerif),
- titleSmall = TextStyle(fontFamily = FontFamily.SansSerif),
- bodyLarge = TextStyle(fontFamily = FontFamily.SansSerif),
- bodyMedium = TextStyle(fontFamily = FontFamily.SansSerif, fontWeight = FontWeight.SemiBold),
- bodySmall = TextStyle(fontFamily = FontFamily.SansSerif, fontWeight = FontWeight.SemiBold),
- labelLarge =
- TextStyle(
- fontFamily = FontFamily.SansSerif,
- fontWeight = FontWeight.SemiBold,
- fontSize = 18.sp,
- lineHeight = 23.sp,
- ),
- labelMedium =
- TextStyle(fontFamily = FontFamily.SansSerif, fontWeight = FontWeight.SemiBold),
- labelSmall = TextStyle(fontFamily = FontFamily.SansSerif, fontWeight = FontWeight.SemiBold),
- )
+ with(Typography()) {
+ this.copy(
+ headlineLarge = headlineLarge.merge(fontWeight = FontWeight.Bold),
+ headlineSmall = headlineSmall.merge(fontWeight = FontWeight.SemiBold),
+ titleLarge = titleLarge.merge(fontWeight = FontWeight.SemiBold),
+ titleMedium = titleMedium.merge(fontWeight = FontWeight.SemiBold),
+ )
+ }
diff --git a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/dimensions/Dimensions.kt b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/dimensions/Dimensions.kt
index 1fff17afb4..0d40e7c805 100644
--- a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/dimensions/Dimensions.kt
+++ b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/dimensions/Dimensions.kt
@@ -30,7 +30,7 @@ data class Dimensions(
val circularProgressBarSmallStrokeWidth: Dp = 3.dp,
val connectButtonExtraPadding: Dp = 4.dp,
val connectionCardMaxWidth: Dp = 480.dp,
- val customPortBoxMinWidth: Dp = 80.dp,
+ val customPortBoxMinWidth: Dp = 60.dp,
val deleteIconSize: Dp = 24.dp,
val dialogIconHeight: Dp = 44.dp,
val formTextFieldMinHeight: Dp = 72.dp,
@@ -52,7 +52,7 @@ data class Dimensions(
val notificationEndIconPadding: Dp = 4.dp,
val notificationIconPadding: Dp = 10.dp,
val notificationStatusIconSize: Dp = 10.dp,
- val obfuscationNavigationBoxWidth: Dp = 80.dp,
+ val obfuscationNavigationBoxWidth: Dp = 60.dp,
val outLineButtonBorderWidth: Dp = 1.dp,
val payIconHeight: Dp = 20.dp,
val privacyPolicyIconSize: Dp = 16.dp,
diff --git a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/typeface/TypeScale.kt b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/typeface/TypeScale.kt
deleted file mode 100644
index 4e5492a630..0000000000
--- a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/typeface/TypeScale.kt
+++ /dev/null
@@ -1,23 +0,0 @@
-package net.mullvad.mullvadvpn.lib.theme.typeface
-
-import androidx.compose.ui.unit.sp
-
-/**
- * Font sizes used by text styles in the app.
- *
- * NOTE:
- * * Do not use these font sizes directly. Instead use the styles defined in Typeface and/or the
- * standard styles in the material theme
- * * Order entries within each type by descending size.
- */
-internal object TypeScale {
- val TextHuge = 30.sp
- val TextHeadline = 28.sp
- val TextBig = 24.sp
- val TextMediumPlus = 18.sp
- val TextMedium = 16.sp
- val TextSmall = 13.sp
- val TitleLarge = 22.sp
-
- val HeadlineMediumLineHeight = 36.0.sp
-}
diff --git a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/typeface/Typeface.kt b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/typeface/Typeface.kt
index 179b417014..ac0fbe2666 100644
--- a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/typeface/Typeface.kt
+++ b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/typeface/Typeface.kt
@@ -1,48 +1,3 @@
package net.mullvad.mullvadvpn.lib.theme.typeface
-import androidx.compose.material3.Typography
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.text.TextStyle
-import androidx.compose.ui.text.font.FontWeight
-import androidx.compose.ui.unit.TextUnit
-
// Add text styles not in the material theme here
-val Typography.listItemText: TextStyle
- @Composable
- get() {
- return TextStyle(
- fontWeight = FontWeight.Normal,
- letterSpacing = TextUnit.Unspecified,
- fontSize = TypeScale.TextMediumPlus,
- )
- }
-
-val Typography.listItemSubText: TextStyle
- @Composable
- get() {
- return TextStyle(
- fontWeight = FontWeight.SemiBold,
- letterSpacing = TextUnit.Unspecified,
- fontSize = TypeScale.TextSmall,
- )
- }
-
-val Typography.connectionStatus: TextStyle
- @Composable
- get() {
- return TextStyle(
- fontWeight = FontWeight.SemiBold,
- letterSpacing = TextUnit.Unspecified,
- fontSize = TypeScale.TitleLarge,
- )
- }
-
-val Typography.hostname: TextStyle
- @Composable
- get() {
- return TextStyle(
- fontWeight = FontWeight.Normal,
- letterSpacing = TextUnit.Unspecified,
- fontSize = TypeScale.TextMediumPlus,
- )
- }
diff --git a/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/AnimatedNotificationBanner.kt b/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/AnimatedNotificationBanner.kt
index 62c3b5522a..4a9bdf1769 100644
--- a/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/AnimatedNotificationBanner.kt
+++ b/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/AnimatedNotificationBanner.kt
@@ -117,7 +117,7 @@ private fun Notification(modifier: Modifier = Modifier, notificationBannerData:
width = Dimension.fillToConstraints
}
.padding(start = Dimens.smallPadding),
- style = MaterialTheme.typography.bodySmall,
+ style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.onSurface,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
@@ -155,7 +155,7 @@ private fun Notification(modifier: Modifier = Modifier, notificationBannerData:
}
},
color = MaterialTheme.colorScheme.onSurfaceVariant,
- style = MaterialTheme.typography.labelMedium,
+ style = MaterialTheme.typography.bodyMedium,
)
}
action?.let {