Use content padding instead of padding on container
This commit is contained in:
parent
72f054a4fa
commit
d56eef6ece
|
@ -73,12 +73,12 @@ fun AboutTab() {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(16.dp)
|
|
||||||
.verticalScroll(scrollState),
|
.verticalScroll(scrollState),
|
||||||
verticalArrangement = Arrangement.spacedBy(8.dp)
|
verticalArrangement = Arrangement.spacedBy(8.dp)
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
.padding(16.dp)
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.wrapContentSize(Alignment.Center),
|
.wrapContentSize(Alignment.Center),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
|
@ -108,11 +108,11 @@ fun AboutTab() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(4.dp))
|
|
||||||
|
|
||||||
for (item in ABOUT_ITEMS) {
|
for (item in ABOUT_ITEMS) {
|
||||||
AboutItem(item)
|
AboutItem(item, Modifier.padding(horizontal = 16.dp))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Spacer(Modifier.height(8.dp))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,8 +120,11 @@ fun AboutTab() {
|
||||||
@Preview(backgroundColor = 0xFFFFFFFF, showBackground = true)
|
@Preview(backgroundColor = 0xFFFFFFFF, showBackground = true)
|
||||||
@Composable
|
@Composable
|
||||||
@NonRestartableComposable
|
@NonRestartableComposable
|
||||||
private fun AboutItem(@PreviewParameter(AboutDataProvider::class) aboutData: AboutData) {
|
private fun AboutItem(
|
||||||
Column {
|
@PreviewParameter(AboutDataProvider::class) aboutData: AboutData,
|
||||||
|
modifier: Modifier = Modifier,
|
||||||
|
) {
|
||||||
|
Column(modifier = modifier) {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(aboutData.title),
|
text = stringResource(aboutData.title),
|
||||||
style = MaterialTheme.typography.titleMedium
|
style = MaterialTheme.typography.titleMedium
|
||||||
|
|
Loading…
Reference in New Issue