Skip to content

Commit

Permalink
Merge branch 'dialog-use-default-title-font-droid-603'
Browse files Browse the repository at this point in the history
  • Loading branch information
albin-mullvad committed Dec 29, 2023
2 parents 44296e2 + 730f6bc commit 2d1e643
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.result.ResultBackNavigator
Expand Down Expand Up @@ -138,7 +137,6 @@ fun DnsDialog(
stringResource(R.string.update_dns_server_dialog_title)
},
color = Color.White,
style = MaterialTheme.typography.headlineSmall.copy(fontWeight = FontWeight.Normal)
)
},
text = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private fun PreviewChangelogDialogWithTwoLongItems() {
fun InfoDialog(message: String, additionalInfo: String? = null, onDismiss: () -> Unit) {
AlertDialog(
onDismissRequest = { onDismiss() },
title = {
icon = {
Icon(
modifier = Modifier.fillMaxWidth().height(Dimens.dialogIconHeight),
painter = painterResource(id = R.drawable.icon_info),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ fun MtuDialog(
Text(
text = stringResource(id = R.string.wireguard_mtu),
color = MaterialTheme.colorScheme.onBackground,
style = MaterialTheme.typography.headlineSmall
)
},
text = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ fun RedeemVoucherDialog(
if (uiState.voucherViewModelState !is VoucherDialogState.Success)
Text(
text = stringResource(id = R.string.enter_voucher_code),
style = MaterialTheme.typography.titleMedium
)
},
confirmButton = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
package net.mullvad.mullvadvpn.compose.dialog

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
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.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
Expand Down Expand Up @@ -46,17 +43,13 @@ private fun PreviewRemoveDeviceConfirmationDialog() {
fun RemoveDeviceConfirmationDialog(navigator: ResultBackNavigator<String>, device: Device) {
AlertDialog(
onDismissRequest = { navigator.navigateBack() },
title = {
Column(
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier.padding(top = 0.dp).fillMaxWidth()
) {
Image(
painter = painterResource(id = R.drawable.icon_alert),
contentDescription = "Remove",
modifier = Modifier.width(50.dp).height(50.dp)
)
}
icon = {
Icon(
painter = painterResource(id = R.drawable.icon_alert),
contentDescription = "Remove",
modifier = Modifier.width(50.dp).height(50.dp),
tint = Color.Unspecified
)
},
text = {
val htmlFormattedDialogText =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ fun WireguardCustomPortDialog(
title = {
Text(
text = stringResource(id = R.string.custom_port_dialog_title),
style = MaterialTheme.typography.headlineSmall
)
},
confirmButton = {
Expand Down

0 comments on commit 2d1e643

Please sign in to comment.