From dfebc2f1b35d25fe186967f8d4292d55d80be0fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20G=C3=B6ransson?= Date: Fri, 1 Dec 2023 10:44:58 +0100 Subject: [PATCH] Fix button spacing --- .../net/mullvad/mullvadvpn/compose/button/ConnectionButton.kt | 4 +++- .../net/mullvad/mullvadvpn/compose/screen/OutOfTimeScreen.kt | 2 +- .../net/mullvad/mullvadvpn/compose/screen/WelcomeScreen.kt | 2 +- .../net/mullvad/mullvadvpn/lib/theme/dimensions/Dimensions.kt | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/button/ConnectionButton.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/button/ConnectionButton.kt index e80e17e444fd..3815a3bb4696 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/button/ConnectionButton.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/button/ConnectionButton.kt @@ -135,7 +135,9 @@ private fun ConnectionButton( modifier: Modifier = Modifier, reconnectButtonTestTag: String = "" ) { - ConstraintLayout(modifier = modifier.fillMaxWidth()) { + ConstraintLayout( + modifier = modifier.padding(vertical = Dimens.connectButtonExtraPadding).fillMaxWidth() + ) { // initial height set at 0.dp var componentHeight by remember { mutableStateOf(0.dp) } 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 a7fd6bae2fa0..b7b4744bb29f 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 @@ -230,7 +230,7 @@ fun OutOfTimeScreen( Modifier.padding( start = Dimens.sideMargin, end = Dimens.sideMargin, - bottom = Dimens.screenVerticalMargin + bottom = Dimens.buttonSpacing ) .align(Alignment.CenterHorizontally) ) 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 d26e8c826539..4778756648eb 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 @@ -333,7 +333,7 @@ private fun PaymentPanel( Modifier.padding( start = Dimens.sideMargin, end = Dimens.sideMargin, - bottom = Dimens.screenVerticalMargin + bottom = Dimens.buttonSpacing ) .align(Alignment.CenterHorizontally) ) 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 404b556d941e..f0eea30fa6a1 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 @@ -26,6 +26,7 @@ data class Dimensions( val circularProgressBarSmallSize: Dp = 24.dp, val circularProgressBarSmallStrokeWidth: Dp = 3.dp, val cityRowPadding: Dp = 34.dp, + val connectButtonExtraPadding: Dp = 4.dp, val countryRowPadding: Dp = 18.dp, val customPortBoxMinWidth: Dp = 80.dp, val dialogIconHeight: Dp = 44.dp,