From 0bd56ab77cb654f016f6ed6c52dd7afd7cd72836 Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 21 Feb 2023 11:50:15 -0500 Subject: [PATCH] Fix height shift when scrolling through themes --- .../more/settings/widget/AppThemePreferenceWidget.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/widget/AppThemePreferenceWidget.kt b/app/src/main/java/eu/kanade/presentation/more/settings/widget/AppThemePreferenceWidget.kt index c7aa009996..8b76552f04 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/widget/AppThemePreferenceWidget.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/widget/AppThemePreferenceWidget.kt @@ -1,6 +1,5 @@ package eu.kanade.presentation.more.settings.widget -import androidx.compose.animation.animateContentSize import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.clickable @@ -9,6 +8,7 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxWidth @@ -79,9 +79,6 @@ private fun AppThemesList( .filterNot { it.titleResId == null || (it == AppTheme.MONET && !DeviceUtil.isDynamicColorAvailable) } } LazyRow( - modifier = Modifier - .animateContentSize() - .padding(vertical = MaterialTheme.padding.small), contentPadding = PaddingValues(horizontal = PrefsHorizontalPadding), horizontalArrangement = Arrangement.spacedBy(MaterialTheme.padding.small), ) { @@ -104,14 +101,16 @@ private fun AppThemesList( ) } + Spacer(modifier = Modifier.height(8.dp)) + Text( text = stringResource(appTheme.titleResId!!), modifier = Modifier .fillMaxWidth() - .padding(top = 8.dp) .secondaryItemAlpha(), textAlign = TextAlign.Center, maxLines = 2, + minLines = 2, style = MaterialTheme.typography.bodyMedium, ) }