Use shapes from theme everywhere

This commit is contained in:
MM20 2022-06-10 20:14:01 +02:00
parent 6d9dc5758d
commit b60a751cf3
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
12 changed files with 14 additions and 13 deletions

View File

@ -37,7 +37,7 @@ fun WeatherLocationSearchDialog(
Surface( Surface(
tonalElevation = 16.dp, tonalElevation = 16.dp,
shadowElevation = 16.dp, shadowElevation = 16.dp,
shape = RoundedCornerShape(16.dp), shape = MaterialTheme.shapes.extraLarge,
modifier = Modifier modifier = Modifier
.fillMaxSize() .fillMaxSize()
.padding(vertical = 16.dp), .padding(vertical = 16.dp),

View File

@ -158,7 +158,7 @@ fun BottomSheetDialog(
.offset { IntOffset(0, swipeState.offset.value.roundToInt()) } .offset { IntOffset(0, swipeState.offset.value.roundToInt()) }
.fillMaxWidth() .fillMaxWidth()
.weight(1f, false), .weight(1f, false),
shape = MaterialTheme.shapes.large.copy( shape = MaterialTheme.shapes.extraLarge.copy(
bottomStart = CornerSize(0), bottomStart = CornerSize(0),
bottomEnd = CornerSize(0), bottomEnd = CornerSize(0),
), ),

View File

@ -24,7 +24,7 @@ fun Chip(
content: @Composable RowScope.() -> Unit content: @Composable RowScope.() -> Unit
) { ) {
Surface( Surface(
shape = RoundedCornerShape(8.dp), shape = MaterialTheme.shapes.small,
modifier = modifier, modifier = modifier,
color = Color.Transparent, color = Color.Transparent,
border = BorderStroke(1.dp, MaterialTheme.colorScheme.outline.copy(alpha = 0.17f)), border = BorderStroke(1.dp, MaterialTheme.colorScheme.outline.copy(alpha = 0.17f)),

View File

@ -55,7 +55,7 @@ fun InnerCard(
if (it) 1f else 0f if (it) 1f else 0f
} }
val shape = RoundedCornerShape(LocalCardStyle.current.radius.dp) val shape = MaterialTheme.shapes.small
val bgColor = MaterialTheme.colorScheme.surfaceColorAtElevation(absoluteTonalElevation + elevation) val bgColor = MaterialTheme.colorScheme.surfaceColorAtElevation(absoluteTonalElevation + elevation)

View File

@ -42,7 +42,7 @@ fun <T> ListPreference(
Surface( Surface(
tonalElevation = 16.dp, tonalElevation = 16.dp,
shadowElevation = 16.dp, shadowElevation = 16.dp,
shape = RoundedCornerShape(16.dp), shape = MaterialTheme.shapes.extraLarge,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding(vertical = 16.dp), .padding(vertical = 16.dp),

View File

@ -306,7 +306,7 @@ fun SearchBar(
) { ) {
items(websearches) { items(websearches) {
Surface( Surface(
shape = RoundedCornerShape(4.dp), shape = MaterialTheme.shapes.extraSmall,
modifier = Modifier.padding(horizontal = 8.dp) modifier = Modifier.padding(horizontal = 8.dp)
) { ) {
Row( Row(

View File

@ -48,7 +48,7 @@ fun UnitConverterItem(
.padding(12.dp) .padding(12.dp)
.size(48.dp), .size(48.dp),
color = MaterialTheme.colorScheme.primaryContainer, color = MaterialTheme.colorScheme.primaryContainer,
shape = RoundedCornerShape(8.dp) shape = MaterialTheme.shapes.small
) { ) {
Box( Box(
contentAlignment = Alignment.Center contentAlignment = Alignment.Center

View File

@ -214,7 +214,7 @@ fun WidgetColumn(
Surface( Surface(
tonalElevation = 16.dp, tonalElevation = 16.dp,
shadowElevation = 16.dp, shadowElevation = 16.dp,
shape = RoundedCornerShape(16.dp), shape = MaterialTheme.shapes.extraLarge,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding(top = 16.dp), .padding(top = 16.dp),

View File

@ -9,6 +9,7 @@ import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.ExperimentalAnimationApi import androidx.compose.animation.ExperimentalAnimationApi
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.* import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.CornerSize
import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.ArrowDropDown import androidx.compose.material.icons.rounded.ArrowDropDown
@ -209,7 +210,7 @@ fun CurrentWeather(forecast: Forecast, imperialUnits: Boolean) {
) )
Spacer(modifier = Modifier.weight(1f)) Spacer(modifier = Modifier.weight(1f))
Surface( Surface(
shape = RoundedCornerShape(topStartPercent = 50, bottomStartPercent = 50), shape = MaterialTheme.shapes.extraSmall.copy(bottomEnd = CornerSize(0), topEnd = CornerSize(0)),
color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.12f), color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.12f),
modifier = Modifier.align(Alignment.End) modifier = Modifier.align(Alignment.End)

View File

@ -341,7 +341,7 @@ fun IconShapePreference(
Surface( Surface(
tonalElevation = 16.dp, tonalElevation = 16.dp,
shadowElevation = 16.dp, shadowElevation = 16.dp,
shape = RoundedCornerShape(16.dp), shape = MaterialTheme.shapes.extraLarge,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding(vertical = 16.dp), .padding(vertical = 16.dp),
@ -420,7 +420,7 @@ fun LegacyIconBackgroundPreference(
Surface( Surface(
tonalElevation = 16.dp, tonalElevation = 16.dp,
shadowElevation = 16.dp, shadowElevation = 16.dp,
shape = RoundedCornerShape(16.dp), shape = MaterialTheme.shapes.extraLarge,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding(vertical = 16.dp), .padding(vertical = 16.dp),

View File

@ -94,7 +94,7 @@ fun ExcludedCalendarsPreference(
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.heightIn(max = 400.dp), .heightIn(max = 400.dp),
shape = RoundedCornerShape(16.dp), shape = MaterialTheme.shapes.extraLarge,
tonalElevation = 16.dp, tonalElevation = 16.dp,
shadowElevation = 16.dp, shadowElevation = 16.dp,
) { ) {

View File

@ -54,7 +54,7 @@ fun CrashReportScreen(fileName: String) {
} else { } else {
MaterialTheme.colorScheme.primaryContainer MaterialTheme.colorScheme.primaryContainer
}, },
shape = RoundedCornerShape(8.dp) shape = MaterialTheme.shapes.small,
) { ) {
Box( Box(
modifier = Modifier modifier = Modifier