Skip to content

Commit 402e20c

Browse files
committed
Fixes #14407
1 parent 00120e8 commit 402e20c

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

app/src/main/java/org/thoughtcrime/securesms/registration/ui/countrycode/CountryCodeSelectScreen.kt

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import androidx.compose.foundation.clickable
1111
import androidx.compose.foundation.layout.Row
1212
import androidx.compose.foundation.layout.defaultMinSize
1313
import androidx.compose.foundation.layout.fillMaxWidth
14-
import androidx.compose.foundation.layout.height
1514
import androidx.compose.foundation.layout.padding
1615
import androidx.compose.foundation.layout.size
1716
import androidx.compose.foundation.lazy.LazyColumn
@@ -48,6 +47,7 @@ import androidx.compose.ui.text.font.FontWeight
4847
import androidx.compose.ui.text.input.KeyboardType
4948
import androidx.compose.ui.text.input.VisualTransformation
5049
import androidx.compose.ui.text.withStyle
50+
import androidx.compose.ui.tooling.preview.Preview
5151
import androidx.compose.ui.unit.dp
5252
import kotlinx.coroutines.launch
5353
import org.signal.core.ui.compose.DayNightPreviews
@@ -269,9 +269,10 @@ private fun SearchBar(
269269
shape = RoundedCornerShape(32.dp),
270270
modifier = modifier
271271
.background(MaterialTheme.colorScheme.background)
272-
.padding(bottom = 18.dp, start = 16.dp, end = 16.dp)
272+
.padding(bottom = 18.dp)
273+
.padding(horizontal = 16.dp)
273274
.fillMaxWidth()
274-
.height(54.dp)
275+
.defaultMinSize(54.dp)
275276
.focusRequester(focusRequester),
276277
visualTransformation = VisualTransformation.None,
277278
colors = TextFieldDefaults.colors(
@@ -318,3 +319,28 @@ private fun LoadingScreenPreview() {
318319
)
319320
}
320321
}
322+
323+
@Preview(
324+
name = "large font",
325+
group = "font scales",
326+
fontScale = 2f
327+
)
328+
@Composable
329+
private fun LargeFontScreenPreview() {
330+
Previews.Preview {
331+
CountryCodeSelectScreen(
332+
state = CountryCodeState(
333+
countryList = mutableListOf(
334+
Country("\uD83C\uDDFA\uD83C\uDDF8", "United States", 1, "US"),
335+
Country("\uD83C\uDDE8\uD83C\uDDE6", "Canada", 2, "CA"),
336+
Country("\uD83C\uDDF2\uD83C\uDDFD", "Mexico", 3, "MX")
337+
),
338+
commonCountryList = mutableListOf(
339+
Country("\uD83C\uDDFA\uD83C\uDDF8", "United States", 4, "US"),
340+
Country("\uD83C\uDDE8\uD83C\uDDE6", "Canada", 5, "CA")
341+
)
342+
),
343+
title = "Your country"
344+
)
345+
}
346+
}

0 commit comments

Comments
 (0)