Skip to content

Commit

Permalink
Merge branch 'set-dialog-radius-to-the-correct-value-droid-358'
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Sep 25, 2023
2 parents e2b50fb + 9a3b718 commit bdac804
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import net.mullvad.mullvadvpn.R
import net.mullvad.mullvadvpn.compose.textfield.DnsTextField
import net.mullvad.mullvadvpn.lib.theme.AppTheme
import net.mullvad.mullvadvpn.lib.theme.MullvadBlue
import net.mullvad.mullvadvpn.lib.theme.MullvadDarkBlue
import net.mullvad.mullvadvpn.lib.theme.MullvadRed
import net.mullvad.mullvadvpn.lib.theme.MullvadWhite
import net.mullvad.mullvadvpn.lib.theme.MullvadWhite20
Expand All @@ -39,14 +39,17 @@ import net.mullvad.mullvadvpn.viewmodel.StagedDns
@Preview
@Composable
private fun PreviewDnsDialog() {
DnsDialog(
stagedDns = StagedDns.NewDns(CustomDnsItem.default(), StagedDns.ValidationResult.Success),
isAllowLanEnabled = true,
onIpAddressChanged = {},
onAttemptToSave = {},
onRemove = {},
onDismiss = {}
)
AppTheme {
DnsDialog(
stagedDns =
StagedDns.NewDns(CustomDnsItem.default(), StagedDns.ValidationResult.Success),
isAllowLanEnabled = true,
onIpAddressChanged = {},
onAttemptToSave = {},
onRemove = {},
onDismiss = {}
)
}
}

@Composable
Expand Down Expand Up @@ -79,7 +82,10 @@ fun DnsDialog(
Modifier
// Related to the fix for https://issuetracker.google.com/issues/221643630
.fillMaxWidth(0.8f)
.background(color = MullvadDarkBlue)
.background(
color = MaterialTheme.colorScheme.background,
MaterialTheme.shapes.extraLarge
)
.padding(dialogPadding)
) {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ import net.mullvad.mullvadvpn.constant.MTU_MIN_VALUE
import net.mullvad.mullvadvpn.lib.theme.AlphaDescription
import net.mullvad.mullvadvpn.lib.theme.AlphaDisabled
import net.mullvad.mullvadvpn.lib.theme.AlphaInactive
import net.mullvad.mullvadvpn.lib.theme.AppTheme
import net.mullvad.mullvadvpn.lib.theme.Dimens
import net.mullvad.mullvadvpn.util.isValidMtu

@Preview
@Composable
private fun PreviewMtuDialog() {
MtuDialog(mtuInitial = 1234, onSave = {}, onRestoreDefaultValue = {}, onDismiss = {})
AppTheme {
MtuDialog(mtuInitial = 1234, onSave = {}, onRestoreDefaultValue = {}, onDismiss = {})
}
}

@Composable
Expand Down Expand Up @@ -65,7 +68,10 @@ fun MtuDialog(
Modifier
// Related to the fix for https://issuetracker.google.com/issues/221643630
.fillMaxWidth(0.8f)
.background(color = MaterialTheme.colorScheme.background)
.background(
color = MaterialTheme.colorScheme.background,
shape = MaterialTheme.shapes.extraLarge
)
.padding(dialogPadding)
) {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ val Shapes =
small = RoundedCornerShape(4.dp),
medium = RoundedCornerShape(4.dp),
large = RoundedCornerShape(0.dp),
extraLarge = RoundedCornerShape(4.dp)
extraLarge = RoundedCornerShape(11.dp)
)

val Dimens: Dimensions
Expand Down

0 comments on commit bdac804

Please sign in to comment.