diff --git a/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt index 1b3ea6148a..b092f8f5a6 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt @@ -23,7 +23,6 @@ import androidx.compose.material.icons.outlined.History import androidx.compose.material.icons.outlined.Settings import androidx.compose.material3.AlertDialog import androidx.compose.material3.Button -import androidx.compose.material3.Divider import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme @@ -57,7 +56,7 @@ import eu.kanade.presentation.components.ScrollbarLazyColumn import eu.kanade.presentation.components.WarningBanner import eu.kanade.presentation.more.settings.widget.TextPreferenceWidget import eu.kanade.presentation.more.settings.widget.TrailingWidgetBuffer -import eu.kanade.presentation.util.horizontalPadding +import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.extension.model.Extension import eu.kanade.tachiyomi.source.ConfigurableSource @@ -208,10 +207,10 @@ private fun DetailsHeader( modifier = Modifier .fillMaxWidth() .padding( - start = horizontalPadding, - end = horizontalPadding, - top = 16.dp, - bottom = 8.dp, + start = MaterialTheme.padding.medium, + end = MaterialTheme.padding.medium, + top = MaterialTheme.padding.medium, + bottom = MaterialTheme.padding.small, ), horizontalAlignment = Alignment.CenterHorizontally, ) { @@ -240,8 +239,8 @@ private fun DetailsHeader( modifier = Modifier .fillMaxWidth() .padding( - horizontal = horizontalPadding * 2, - vertical = 8.dp, + horizontal = MaterialTheme.padding.extraLarge, + vertical = MaterialTheme.padding.small, ), horizontalArrangement = Arrangement.SpaceEvenly, verticalAlignment = Alignment.CenterVertically, @@ -278,10 +277,10 @@ private fun DetailsHeader( Row( modifier = Modifier.padding( - start = horizontalPadding, - end = horizontalPadding, - top = 8.dp, - bottom = 16.dp, + start = MaterialTheme.padding.medium, + end = MaterialTheme.padding.medium, + top = MaterialTheme.padding.small, + bottom = MaterialTheme.padding.medium, ), ) { OutlinedButton( diff --git a/app/src/main/java/eu/kanade/presentation/browse/ExtensionsScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/ExtensionsScreen.kt index 05f4d7a7b7..e16acf6a9a 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/ExtensionsScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/ExtensionsScreen.kt @@ -43,10 +43,10 @@ import eu.kanade.presentation.components.LoadingScreen import eu.kanade.presentation.components.SwipeRefresh import eu.kanade.presentation.manga.components.DotSeparatorNoSpaceText import eu.kanade.presentation.theme.header -import eu.kanade.presentation.util.horizontalPadding +import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.plus import eu.kanade.presentation.util.secondaryItemAlpha -import eu.kanade.presentation.util.topPaddingValues +import eu.kanade.presentation.util.topSmallPaddingValues import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.extension.model.Extension import eu.kanade.tachiyomi.extension.model.InstallStep @@ -113,7 +113,7 @@ private fun ExtensionContent( var trustState by remember { mutableStateOf(null) } FastScrollLazyColumn( - contentPadding = contentPadding + topPaddingValues, + contentPadding = contentPadding + topSmallPaddingValues, ) { items( items = state.items, @@ -272,7 +272,7 @@ private fun ExtensionItemContent( modifier: Modifier = Modifier, ) { Column( - modifier = modifier.padding(start = horizontalPadding), + modifier = modifier.padding(start = MaterialTheme.padding.medium), ) { Text( text = extension.name, @@ -396,7 +396,7 @@ private fun ExtensionHeader( action: @Composable RowScope.() -> Unit = {}, ) { Row( - modifier = modifier.padding(horizontal = horizontalPadding), + modifier = modifier.padding(horizontal = MaterialTheme.padding.medium), verticalAlignment = Alignment.CenterVertically, ) { Text( diff --git a/app/src/main/java/eu/kanade/presentation/browse/MigrateSourceScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/MigrateSourceScreen.kt index 6857ba2a01..f61f313afe 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/MigrateSourceScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/MigrateSourceScreen.kt @@ -34,10 +34,10 @@ import eu.kanade.presentation.components.LoadingScreen import eu.kanade.presentation.components.ScrollbarLazyColumn import eu.kanade.presentation.components.Scroller.STICKY_HEADER_KEY_PREFIX import eu.kanade.presentation.theme.header -import eu.kanade.presentation.util.horizontalPadding +import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.plus import eu.kanade.presentation.util.secondaryItemAlpha -import eu.kanade.presentation.util.topPaddingValues +import eu.kanade.presentation.util.topSmallPaddingValues import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.ui.browse.migration.sources.MigrationSourcesPresenter import eu.kanade.tachiyomi.util.system.copyToClipboard @@ -84,13 +84,13 @@ private fun MigrateSourceList( onToggleSortingDirection: () -> Unit, ) { ScrollbarLazyColumn( - contentPadding = contentPadding + topPaddingValues, + contentPadding = contentPadding + topSmallPaddingValues, ) { stickyHeader(key = STICKY_HEADER_KEY_PREFIX) { Row( modifier = Modifier .background(MaterialTheme.colorScheme.background) - .padding(start = horizontalPadding), + .padding(start = MaterialTheme.padding.medium), verticalAlignment = Alignment.CenterVertically, ) { Text( @@ -152,7 +152,7 @@ private fun MigrateSourceItem( content = { _, sourceLangString -> Column( modifier = Modifier - .padding(horizontal = horizontalPadding) + .padding(horizontal = MaterialTheme.padding.medium) .weight(1f), ) { Text( diff --git a/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt index 74da046ecc..a0366df5c9 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt @@ -30,9 +30,9 @@ import eu.kanade.presentation.components.EmptyScreen import eu.kanade.presentation.components.LoadingScreen import eu.kanade.presentation.components.ScrollbarLazyColumn import eu.kanade.presentation.theme.header -import eu.kanade.presentation.util.horizontalPadding +import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.plus -import eu.kanade.presentation.util.topPaddingValues +import eu.kanade.presentation.util.topSmallPaddingValues import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.source.LocalSource import eu.kanade.tachiyomi.ui.browse.source.SourcesPresenter @@ -85,7 +85,7 @@ private fun SourceList( onClickPin: (Source) -> Unit, ) { ScrollbarLazyColumn( - contentPadding = contentPadding + topPaddingValues, + contentPadding = contentPadding + topSmallPaddingValues, ) { items( items = state.items, @@ -146,7 +146,7 @@ private fun SourceHeader( Text( text = LocaleHelper.getSourceDisplayName(language, context), modifier = modifier - .padding(horizontal = horizontalPadding, vertical = 8.dp), + .padding(horizontal = MaterialTheme.padding.medium, vertical = MaterialTheme.padding.small), style = MaterialTheme.typography.header, ) } diff --git a/app/src/main/java/eu/kanade/presentation/browse/components/BaseBrowseItem.kt b/app/src/main/java/eu/kanade/presentation/browse/components/BaseBrowseItem.kt index 2b3dd022fb..f5f669a7cc 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/components/BaseBrowseItem.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/components/BaseBrowseItem.kt @@ -4,11 +4,11 @@ import androidx.compose.foundation.combinedClickable import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.RowScope import androidx.compose.foundation.layout.padding +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp -import eu.kanade.presentation.util.horizontalPadding +import eu.kanade.presentation.util.padding @Composable fun BaseBrowseItem( @@ -25,7 +25,7 @@ fun BaseBrowseItem( onClick = onClickItem, onLongClick = onLongClickItem, ) - .padding(horizontal = horizontalPadding, vertical = 8.dp), + .padding(horizontal = MaterialTheme.padding.medium, vertical = MaterialTheme.padding.small), verticalAlignment = Alignment.CenterVertically, ) { icon() diff --git a/app/src/main/java/eu/kanade/presentation/browse/components/BaseSourceItem.kt b/app/src/main/java/eu/kanade/presentation/browse/components/BaseSourceItem.kt index a517ab1088..97ba0f4836 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/components/BaseSourceItem.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/components/BaseSourceItem.kt @@ -10,7 +10,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.text.style.TextOverflow import eu.kanade.domain.source.model.Source -import eu.kanade.presentation.util.horizontalPadding +import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.secondaryItemAlpha import eu.kanade.tachiyomi.util.system.LocaleHelper @@ -43,7 +43,7 @@ private val defaultIcon: @Composable RowScope.(Source) -> Unit = { source -> private val defaultContent: @Composable RowScope.(Source, String?) -> Unit = { source, sourceLangString -> Column( modifier = Modifier - .padding(horizontal = horizontalPadding) + .padding(horizontal = MaterialTheme.padding.medium) .weight(1f), ) { Text( diff --git a/app/src/main/java/eu/kanade/presentation/category/CategoryScreen.kt b/app/src/main/java/eu/kanade/presentation/category/CategoryScreen.kt index d67a162827..53d53ab2d2 100644 --- a/app/src/main/java/eu/kanade/presentation/category/CategoryScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/category/CategoryScreen.kt @@ -3,6 +3,7 @@ package eu.kanade.presentation.category import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.rememberLazyListState +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource @@ -12,9 +13,9 @@ import eu.kanade.presentation.category.components.CategoryFloatingActionButton import eu.kanade.presentation.components.AppBar import eu.kanade.presentation.components.EmptyScreen import eu.kanade.presentation.components.Scaffold -import eu.kanade.presentation.util.horizontalPadding +import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.plus -import eu.kanade.presentation.util.topPaddingValues +import eu.kanade.presentation.util.topSmallPaddingValues import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.ui.category.CategoryScreenState @@ -55,7 +56,7 @@ fun CategoryScreen( CategoryContent( categories = state.categories, lazyListState = lazyListState, - paddingValues = paddingValues + topPaddingValues + PaddingValues(horizontal = horizontalPadding), + paddingValues = paddingValues + topSmallPaddingValues + PaddingValues(horizontal = MaterialTheme.padding.medium), onClickRename = onClickRename, onClickDelete = onClickDelete, onMoveUp = onClickMoveUp, diff --git a/app/src/main/java/eu/kanade/presentation/category/components/CategoryListItem.kt b/app/src/main/java/eu/kanade/presentation/category/components/CategoryListItem.kt index 33f106d81b..283692e952 100644 --- a/app/src/main/java/eu/kanade/presentation/category/components/CategoryListItem.kt +++ b/app/src/main/java/eu/kanade/presentation/category/components/CategoryListItem.kt @@ -14,13 +14,14 @@ import androidx.compose.material.icons.outlined.Label import androidx.compose.material3.ElevatedCard import androidx.compose.material3.Icon import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import eu.kanade.domain.category.model.Category -import eu.kanade.presentation.util.horizontalPadding +import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R @Composable @@ -41,14 +42,18 @@ fun CategoryListItem( modifier = Modifier .fillMaxWidth() .clickable { onRename() } - .padding(start = horizontalPadding, top = horizontalPadding, end = horizontalPadding), + .padding( + start = MaterialTheme.padding.medium, + top = MaterialTheme.padding.medium, + end = MaterialTheme.padding.medium, + ), verticalAlignment = Alignment.CenterVertically, ) { Icon(imageVector = Icons.Outlined.Label, contentDescription = "") Text( text = category.name, modifier = Modifier - .padding(start = horizontalPadding), + .padding(start = MaterialTheme.padding.medium), ) } Row { diff --git a/app/src/main/java/eu/kanade/presentation/components/ChangeCategoryDialog.kt b/app/src/main/java/eu/kanade/presentation/components/ChangeCategoryDialog.kt index 0e124ad69d..b3d611a748 100644 --- a/app/src/main/java/eu/kanade/presentation/components/ChangeCategoryDialog.kt +++ b/app/src/main/java/eu/kanade/presentation/components/ChangeCategoryDialog.kt @@ -10,6 +10,7 @@ import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.material3.AlertDialog import androidx.compose.material3.Checkbox +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.material3.TriStateCheckbox import androidx.compose.runtime.Composable @@ -23,7 +24,7 @@ import androidx.compose.ui.res.stringResource import eu.kanade.core.prefs.CheckboxState import eu.kanade.domain.category.model.Category import eu.kanade.presentation.category.visualName -import eu.kanade.presentation.util.horizontalPadding +import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R @Composable @@ -123,7 +124,7 @@ fun ChangeCategoryDialog( Text( text = checkbox.value.visualName, - modifier = Modifier.padding(horizontal = horizontalPadding), + modifier = Modifier.padding(horizontal = MaterialTheme.padding.medium), ) } } diff --git a/app/src/main/java/eu/kanade/presentation/components/RelativeDateHeader.kt b/app/src/main/java/eu/kanade/presentation/components/RelativeDateHeader.kt index bf94b3bcce..261906f1b1 100644 --- a/app/src/main/java/eu/kanade/presentation/components/RelativeDateHeader.kt +++ b/app/src/main/java/eu/kanade/presentation/components/RelativeDateHeader.kt @@ -8,8 +8,7 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.dp -import eu.kanade.presentation.util.horizontalPadding +import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.util.lang.toRelativeString import java.text.DateFormat import java.util.Date @@ -24,7 +23,7 @@ fun RelativeDateHeader( val context = LocalContext.current Text( modifier = modifier - .padding(horizontal = horizontalPadding, vertical = 8.dp), + .padding(horizontal = MaterialTheme.padding.medium, vertical = MaterialTheme.padding.small), text = remember { date.toRelativeString( context, diff --git a/app/src/main/java/eu/kanade/presentation/crash/CrashScreen.kt b/app/src/main/java/eu/kanade/presentation/crash/CrashScreen.kt index fbe01f0d95..826fb7a1b0 100644 --- a/app/src/main/java/eu/kanade/presentation/crash/CrashScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/crash/CrashScreen.kt @@ -32,8 +32,7 @@ import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import eu.kanade.presentation.util.horizontalPadding -import eu.kanade.presentation.util.verticalPadding +import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.util.CrashLogUtil import kotlinx.coroutines.launch @@ -62,8 +61,8 @@ fun CrashScreen( ) } .padding(WindowInsets.navigationBars.asPaddingValues()) - .padding(horizontal = horizontalPadding, vertical = verticalPadding), - verticalArrangement = Arrangement.spacedBy(verticalPadding), + .padding(horizontal = MaterialTheme.padding.medium, vertical = MaterialTheme.padding.small), + verticalArrangement = Arrangement.spacedBy(MaterialTheme.padding.small), ) { Button( onClick = { @@ -89,7 +88,7 @@ fun CrashScreen( .verticalScroll(rememberScrollState()) .padding(paddingValues) .padding(top = 56.dp) - .padding(horizontal = horizontalPadding), + .padding(horizontal = MaterialTheme.padding.medium), horizontalAlignment = Alignment.CenterHorizontally, ) { Icon( @@ -105,11 +104,11 @@ fun CrashScreen( Text( text = stringResource(R.string.crash_screen_description, stringResource(id = R.string.app_name)), modifier = Modifier - .padding(vertical = verticalPadding), + .padding(vertical = MaterialTheme.padding.small), ) Box( modifier = Modifier - .padding(vertical = verticalPadding) + .padding(vertical = MaterialTheme.padding.small) .clip(MaterialTheme.shapes.small) .fillMaxWidth() .background(MaterialTheme.colorScheme.surfaceVariant), @@ -117,7 +116,7 @@ fun CrashScreen( Text( text = exception.toString(), modifier = Modifier - .padding(all = verticalPadding), + .padding(all = MaterialTheme.padding.small), color = MaterialTheme.colorScheme.onSurfaceVariant, ) } diff --git a/app/src/main/java/eu/kanade/presentation/history/components/HistoryItem.kt b/app/src/main/java/eu/kanade/presentation/history/components/HistoryItem.kt index cbb851e3f0..a7c157a65e 100644 --- a/app/src/main/java/eu/kanade/presentation/history/components/HistoryItem.kt +++ b/app/src/main/java/eu/kanade/presentation/history/components/HistoryItem.kt @@ -22,7 +22,7 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import eu.kanade.domain.history.model.HistoryWithRelations import eu.kanade.presentation.components.MangaCover -import eu.kanade.presentation.util.horizontalPadding +import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.util.lang.toTimestampString import java.text.DecimalFormat @@ -42,7 +42,7 @@ fun HistoryItem( modifier = modifier .clickable(onClick = onClickResume) .height(HISTORY_ITEM_HEIGHT) - .padding(horizontal = horizontalPadding, vertical = 8.dp), + .padding(horizontal = MaterialTheme.padding.medium, vertical = MaterialTheme.padding.small), verticalAlignment = Alignment.CenterVertically, ) { MangaCover.Book( @@ -53,7 +53,7 @@ fun HistoryItem( Column( modifier = Modifier .weight(1f) - .padding(start = horizontalPadding, end = 8.dp), + .padding(start = MaterialTheme.padding.medium, end = MaterialTheme.padding.small), ) { val textStyle = MaterialTheme.typography.bodyMedium Text( diff --git a/app/src/main/java/eu/kanade/presentation/manga/components/BaseMangaListItem.kt b/app/src/main/java/eu/kanade/presentation/manga/components/BaseMangaListItem.kt index e5c5828f81..171ab90fa4 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/components/BaseMangaListItem.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/components/BaseMangaListItem.kt @@ -16,7 +16,7 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import eu.kanade.domain.manga.model.Manga import eu.kanade.presentation.components.MangaCover -import eu.kanade.presentation.util.horizontalPadding +import eu.kanade.presentation.util.padding @Composable fun BaseMangaListItem( @@ -32,7 +32,7 @@ fun BaseMangaListItem( modifier = modifier .clickable(onClick = onClickItem) .height(56.dp) - .padding(horizontal = horizontalPadding), + .padding(horizontal = MaterialTheme.padding.medium), verticalAlignment = Alignment.CenterVertically, ) { cover() @@ -44,7 +44,7 @@ fun BaseMangaListItem( private val defaultCover: @Composable RowScope.(Manga, () -> Unit) -> Unit = { manga, onClick -> MangaCover.Square( modifier = Modifier - .padding(vertical = 8.dp) + .padding(vertical = MaterialTheme.padding.small) .fillMaxHeight(), data = manga, onClick = onClick, @@ -56,7 +56,7 @@ private val defaultContent: @Composable RowScope.(Manga) -> Unit = { Text( text = it.title, modifier = Modifier - .padding(start = horizontalPadding), + .padding(start = MaterialTheme.padding.medium), overflow = TextOverflow.Ellipsis, maxLines = 1, style = MaterialTheme.typography.bodyMedium, diff --git a/app/src/main/java/eu/kanade/presentation/updates/UpdatesUiItem.kt b/app/src/main/java/eu/kanade/presentation/updates/UpdatesUiItem.kt index baaaaefd60..410b05542d 100644 --- a/app/src/main/java/eu/kanade/presentation/updates/UpdatesUiItem.kt +++ b/app/src/main/java/eu/kanade/presentation/updates/UpdatesUiItem.kt @@ -40,7 +40,7 @@ import eu.kanade.presentation.components.ChapterDownloadIndicator import eu.kanade.presentation.components.MangaCover import eu.kanade.presentation.components.RelativeDateHeader import eu.kanade.presentation.util.ReadItemAlpha -import eu.kanade.presentation.util.horizontalPadding +import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.selectedBackground import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.download.model.Download @@ -65,7 +65,7 @@ fun LazyListScope.updatesLastUpdatedItem( Box( modifier = Modifier .animateItemPlacement() - .padding(horizontal = horizontalPadding, vertical = 8.dp), + .padding(horizontal = MaterialTheme.padding.medium, vertical = MaterialTheme.padding.small), ) { Text( text = if (time.isNullOrEmpty()) { @@ -169,7 +169,7 @@ fun UpdatesUiItem( }, ) .height(56.dp) - .padding(horizontal = horizontalPadding), + .padding(horizontal = MaterialTheme.padding.medium), verticalAlignment = Alignment.CenterVertically, ) { MangaCover.Square( @@ -181,7 +181,7 @@ fun UpdatesUiItem( ) Column( modifier = Modifier - .padding(horizontal = horizontalPadding) + .padding(horizontal = MaterialTheme.padding.medium) .weight(1f), ) { val bookmark = remember(update.bookmark) { update.bookmark } diff --git a/app/src/main/java/eu/kanade/presentation/util/Constants.kt b/app/src/main/java/eu/kanade/presentation/util/Constants.kt index 25ec0dc53e..246e7f0710 100644 --- a/app/src/main/java/eu/kanade/presentation/util/Constants.kt +++ b/app/src/main/java/eu/kanade/presentation/util/Constants.kt @@ -1,15 +1,24 @@ package eu.kanade.presentation.util import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.material3.MaterialTheme import androidx.compose.ui.unit.dp -private val horizontal = 16.dp -private val vertical = 8.dp - -val horizontalPadding = horizontal -val verticalPadding = vertical - -val topPaddingValues = PaddingValues(top = vertical) +val topSmallPaddingValues = PaddingValues(top = MaterialTheme.padding.small) const val ReadItemAlpha = .38f const val SecondaryItemAlpha = .78f + +class Padding { + + val extraLarge = 32.dp + + val large = 24.dp + + val medium = 16.dp + + val small = 8.dp +} + +val MaterialTheme.padding: Padding + get() = Padding()