From d56eef6ecec717a77942733d58028879f1d41fc3 Mon Sep 17 00:00:00 2001 From: Stypox Date: Wed, 27 Nov 2024 15:59:20 +0100 Subject: [PATCH] Use content padding instead of padding on container --- .../newpipe/ui/components/about/AboutTab.kt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/ui/components/about/AboutTab.kt b/app/src/main/java/org/schabi/newpipe/ui/components/about/AboutTab.kt index 9d38e4a16..3bba5dba9 100644 --- a/app/src/main/java/org/schabi/newpipe/ui/components/about/AboutTab.kt +++ b/app/src/main/java/org/schabi/newpipe/ui/components/about/AboutTab.kt @@ -73,12 +73,12 @@ fun AboutTab() { Column( modifier = Modifier .fillMaxWidth() - .padding(16.dp) .verticalScroll(scrollState), verticalArrangement = Arrangement.spacedBy(8.dp) ) { Column( modifier = Modifier + .padding(16.dp) .fillMaxWidth() .wrapContentSize(Alignment.Center), horizontalAlignment = Alignment.CenterHorizontally @@ -108,11 +108,11 @@ fun AboutTab() { ) } - Spacer(modifier = Modifier.height(4.dp)) - 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) @Composable @NonRestartableComposable -private fun AboutItem(@PreviewParameter(AboutDataProvider::class) aboutData: AboutData) { - Column { +private fun AboutItem( + @PreviewParameter(AboutDataProvider::class) aboutData: AboutData, + modifier: Modifier = Modifier, +) { + Column(modifier = modifier) { Text( text = stringResource(aboutData.title), style = MaterialTheme.typography.titleMedium