summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-02-05 08:47:43 +0100
committerJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-02-06 14:35:37 +0100
commitfe97fe37cfd828f30fef2176ba99f238f00c4c31 (patch)
tree353ab9732e99d1fdaab6fc3a5e498ae3e49ee7f6
parentcb9ab4e67aa974aced5b626999aded509b5802a9 (diff)
downloadmullvadvpn-fe97fe37cfd828f30fef2176ba99f238f00c4c31.tar.xz
mullvadvpn-fe97fe37cfd828f30fef2176ba99f238f00c4c31.zip
Adjust and unify margins in settings and vpn settings
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/BaseCell.kt2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/VpnSettingsScreen.kt20
-rw-r--r--android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/dimensions/Dimensions.kt3
3 files changed, 9 insertions, 16 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 17c4d24460..8e22be8b7e 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
@@ -148,7 +148,7 @@ fun BaseSubtitleCell(
start = Dimens.cellStartPadding,
top = Dimens.cellFooterTopPadding,
end = Dimens.cellEndPadding,
- bottom = Dimens.cellLabelVerticalPadding,
+ bottom = Dimens.cellVerticalSpacing,
)
.fillMaxWidth()
.wrapContentHeight(),
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 de8b7d289a..779b4792b4 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
@@ -320,7 +320,6 @@ fun VpnSettingsScreen(
) {
if (state.systemVpnSettingsAvailable) {
item {
- Spacer(modifier = Modifier.height(Dimens.cellLabelVerticalPadding))
NavigationComposeCell(
title = stringResource(id = R.string.auto_connect_and_lockdown_mode),
onClick = { navigateToAutoConnectScreen() },
@@ -333,7 +332,6 @@ fun VpnSettingsScreen(
}
} else {
item {
- Spacer(modifier = Modifier.height(Dimens.cellLabelVerticalPadding))
HeaderSwitchComposeCell(
title = stringResource(R.string.connect_on_start),
isToggled = state.autoStartAndConnectOnBoot,
@@ -350,7 +348,6 @@ fun VpnSettingsScreen(
}
item {
- Spacer(modifier = Modifier.height(Dimens.cellLabelVerticalPadding))
HeaderSwitchComposeCell(
title = stringResource(R.string.local_network_sharing),
isToggled = state.isLocalNetworkSharingEnabled,
@@ -358,7 +355,7 @@ fun VpnSettingsScreen(
onCellClicked = { newValue -> onToggleLocalNetworkSharing(newValue) },
onInfoClicked = navigateToLocalNetworkSharingInfo,
)
- Spacer(modifier = Modifier.height(Dimens.cellLabelVerticalPadding))
+ Spacer(modifier = Modifier.height(Dimens.cellVerticalSpacing))
}
itemWithDivider {
@@ -443,7 +440,7 @@ fun VpnSettingsScreen(
start = Dimens.cellStartPadding,
top = topPadding,
end = Dimens.cellEndPadding,
- bottom = Dimens.cellLabelVerticalPadding,
+ bottom = Dimens.cellVerticalSpacing,
)
)
}
@@ -497,7 +494,7 @@ fun VpnSettingsScreen(
start = Dimens.cellStartPadding,
top = topPadding,
end = Dimens.cellEndPadding,
- bottom = Dimens.cellLabelVerticalPadding,
+ bottom = Dimens.cellVerticalSpacing,
),
)
}
@@ -577,7 +574,7 @@ fun VpnSettingsScreen(
}
itemWithDivider {
- Spacer(modifier = Modifier.height(Dimens.cellLabelVerticalPadding))
+ Spacer(modifier = Modifier.height(Dimens.cellVerticalSpacing))
InformationComposeCell(
title = stringResource(R.string.obfuscation_title),
onInfoClicked = navigateToObfuscationInfo,
@@ -622,7 +619,7 @@ fun VpnSettingsScreen(
}
itemWithDivider {
- Spacer(modifier = Modifier.height(Dimens.cellLabelVerticalPadding))
+ Spacer(modifier = Modifier.height(Dimens.cellVerticalSpacing))
InformationComposeCell(
title = stringResource(R.string.quantum_resistant_title),
onInfoClicked = navigateToQuantumResistanceInfo,
@@ -651,16 +648,13 @@ fun VpnSettingsScreen(
isSelected = state.quantumResistant == QuantumResistantState.Off,
onCellClicked = { onSelectQuantumResistanceSetting(QuantumResistantState.Off) },
)
- Spacer(modifier = Modifier.height(Dimens.cellLabelVerticalPadding))
+ Spacer(modifier = Modifier.height(Dimens.cellVerticalSpacing))
}
item {
MtuComposeCell(mtuValue = state.mtu, onEditMtu = { navigateToMtuDialog(state.mtu) })
}
- item {
- MtuSubtitle(modifier = Modifier.testTag(LAZY_LIST_LAST_ITEM_TEST_TAG))
- Spacer(modifier = Modifier.height(Dimens.cellLabelVerticalPadding))
- }
+ item { MtuSubtitle(modifier = Modifier.testTag(LAZY_LIST_LAST_ITEM_TEST_TAG)) }
item { ServerIpOverrides(navigateToServerIpOverrides) }
}
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 6a5da5c18d..51b4f5efb8 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
@@ -16,10 +16,9 @@ data class Dimensions(
val cellFooterTopPadding: Dp = 6.dp,
val cellHeight: Dp = 56.dp,
val cellHeightTwoRows: Dp = 72.dp,
- val cellLabelVerticalPadding: Dp = 14.dp,
val cellStartPadding: Dp = 14.dp,
val cellTopPadding: Dp = 6.dp,
- val cellVerticalSpacing: Dp = 14.dp,
+ val cellVerticalSpacing: Dp = 24.dp,
val chipSpace: Dp = 8.dp,
val chipVerticalPadding: Dp = 4.dp,
val circularProgressBarLargeSize: Dp = 44.dp,