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 42f794af6..3264b5b47 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt @@ -23,6 +23,7 @@ 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.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme @@ -30,6 +31,7 @@ import androidx.compose.material3.OutlinedButton import androidx.compose.material3.Switch import androidx.compose.material3.Text import androidx.compose.material3.TextButton +import androidx.compose.material3.VerticalDivider import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf @@ -56,8 +58,6 @@ import eu.kanade.tachiyomi.source.ConfigurableSource import eu.kanade.tachiyomi.ui.browse.extension.details.ExtensionDetailsScreenModel import eu.kanade.tachiyomi.util.system.LocaleHelper import tachiyomi.presentation.core.components.ScrollbarLazyColumn -import tachiyomi.presentation.core.components.material.DIVIDER_ALPHA -import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.components.material.Scaffold import tachiyomi.presentation.core.components.material.padding import tachiyomi.presentation.core.screens.EmptyScreen @@ -314,7 +314,7 @@ private fun DetailsHeader( } } - Divider() + HorizontalDivider() } } @@ -356,11 +356,8 @@ private fun InfoText( @Composable private fun InfoDivider() { - Divider( - modifier = Modifier - .height(20.dp) - .width(1.dp), - color = MaterialTheme.colorScheme.onSurface.copy(alpha = DIVIDER_ALPHA), + VerticalDivider( + modifier = Modifier.height(20.dp), ) } diff --git a/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchToolbar.kt b/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchToolbar.kt index 26c4ca8b2..6f108abba 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchToolbar.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchToolbar.kt @@ -16,11 +16,13 @@ import androidx.compose.material.icons.outlined.FilterList import androidx.compose.material.icons.outlined.PushPin import androidx.compose.material3.FilterChip import androidx.compose.material3.FilterChipDefaults +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.LinearProgressIndicator import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.material3.TopAppBarScrollBehavior +import androidx.compose.material3.VerticalDivider import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -28,8 +30,6 @@ import androidx.compose.ui.res.stringResource import eu.kanade.presentation.components.SearchToolbar import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.ui.browse.source.globalsearch.SourceFilter -import tachiyomi.presentation.core.components.material.Divider -import tachiyomi.presentation.core.components.material.VerticalDivider import tachiyomi.presentation.core.components.material.padding @Composable @@ -123,6 +123,6 @@ fun GlobalSearchToolbar( ) } - Divider() + HorizontalDivider() } } diff --git a/app/src/main/java/eu/kanade/presentation/components/TabbedDialog.kt b/app/src/main/java/eu/kanade/presentation/components/TabbedDialog.kt index 76b0dc904..675f35360 100644 --- a/app/src/main/java/eu/kanade/presentation/components/TabbedDialog.kt +++ b/app/src/main/java/eu/kanade/presentation/components/TabbedDialog.kt @@ -10,6 +10,7 @@ import androidx.compose.foundation.pager.PagerState import androidx.compose.foundation.pager.rememberPagerState import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.MoreVert +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme @@ -30,7 +31,6 @@ import androidx.compose.ui.util.fastForEachIndexed import eu.kanade.tachiyomi.R import kotlinx.coroutines.launch import tachiyomi.presentation.core.components.HorizontalPager -import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.components.material.TabIndicator object TabbedDialogPaddings { @@ -82,7 +82,7 @@ fun TabbedDialog( tabOverflowMenuContent?.let { MoreMenu(it) } } - Divider() + HorizontalDivider() HorizontalPager( modifier = Modifier.animateContentSize(), diff --git a/app/src/main/java/eu/kanade/presentation/library/components/LibraryTabs.kt b/app/src/main/java/eu/kanade/presentation/library/components/LibraryTabs.kt index 5b13efcac..6f68c78de 100644 --- a/app/src/main/java/eu/kanade/presentation/library/components/LibraryTabs.kt +++ b/app/src/main/java/eu/kanade/presentation/library/components/LibraryTabs.kt @@ -2,6 +2,7 @@ package eu.kanade.presentation.library.components import androidx.compose.foundation.layout.Column import androidx.compose.foundation.pager.PagerState +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.MaterialTheme import androidx.compose.material3.ScrollableTabRow import androidx.compose.material3.Tab @@ -9,7 +10,6 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.unit.dp import eu.kanade.presentation.category.visualName import tachiyomi.domain.category.model.Category -import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.components.material.TabIndicator import tachiyomi.presentation.core.components.material.TabText @@ -44,6 +44,6 @@ internal fun LibraryTabs( } } - Divider() + HorizontalDivider() } } diff --git a/app/src/main/java/eu/kanade/presentation/more/LogoHeader.kt b/app/src/main/java/eu/kanade/presentation/more/LogoHeader.kt index 7a09c6c2a..bd7aa1ee4 100644 --- a/app/src/main/java/eu/kanade/presentation/more/LogoHeader.kt +++ b/app/src/main/java/eu/kanade/presentation/more/LogoHeader.kt @@ -4,6 +4,7 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable @@ -12,7 +13,6 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.painterResource import androidx.compose.ui.unit.dp import eu.kanade.tachiyomi.R -import tachiyomi.presentation.core.components.material.Divider @Composable fun LogoHeader() { @@ -29,6 +29,6 @@ fun LogoHeader() { .size(64.dp), ) - Divider() + HorizontalDivider() } } diff --git a/app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt b/app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt index 80f864de9..b857ace3b 100644 --- a/app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt @@ -17,6 +17,7 @@ import androidx.compose.material.icons.outlined.Label import androidx.compose.material.icons.outlined.QueryStats import androidx.compose.material.icons.outlined.Settings import androidx.compose.material.icons.outlined.SettingsBackupRestore +import androidx.compose.material3.HorizontalDivider import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector @@ -31,7 +32,6 @@ import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.ui.more.DownloadQueueState import tachiyomi.core.Constants import tachiyomi.presentation.core.components.ScrollbarLazyColumn -import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.components.material.Scaffold @Composable @@ -94,7 +94,7 @@ fun MoreScreen( ) } - item { Divider() } + item { HorizontalDivider() } item { val downloadQueueState = downloadQueueStateProvider() @@ -147,7 +147,7 @@ fun MoreScreen( ) } - item { Divider() } + item { HorizontalDivider() } item { TextPreferenceWidget( diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsBackupScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsBackupScreen.kt index 8b16f3af9..c790f8005 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsBackupScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsBackupScreen.kt @@ -20,6 +20,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.HorizontalDivider import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.material3.TextButton @@ -55,7 +56,6 @@ import eu.kanade.tachiyomi.util.system.toast import kotlinx.coroutines.launch import tachiyomi.domain.backup.service.BackupPreferences import tachiyomi.presentation.core.components.ScrollbarLazyColumn -import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.util.collectAsState import tachiyomi.presentation.core.util.isScrolledToEnd import tachiyomi.presentation.core.util.isScrolledToStart @@ -180,8 +180,8 @@ object SettingsBackupScreen : SearchableSettings { } } } - if (!state.isScrolledToStart()) Divider(modifier = Modifier.align(Alignment.TopCenter)) - if (!state.isScrolledToEnd()) Divider(modifier = Modifier.align(Alignment.BottomCenter)) + if (!state.isScrolledToStart()) HorizontalDivider(modifier = Modifier.align(Alignment.TopCenter)) + if (!state.isScrolledToEnd()) HorizontalDivider(modifier = Modifier.align(Alignment.BottomCenter)) } }, dismissButton = { diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsSearchScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsSearchScreen.kt index a5dc8a620..aa25602e9 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsSearchScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsSearchScreen.kt @@ -17,6 +17,7 @@ import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material.icons.Icons import androidx.compose.material.icons.outlined.Close +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme @@ -53,7 +54,6 @@ import eu.kanade.presentation.components.UpIcon import eu.kanade.presentation.more.settings.Preference import eu.kanade.presentation.util.Screen import eu.kanade.tachiyomi.R -import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.components.material.Scaffold import tachiyomi.presentation.core.screens.EmptyScreen import tachiyomi.presentation.core.util.runOnEnterKeyPressed @@ -139,7 +139,7 @@ class SettingsSearchScreen : Screen() { } }, ) - Divider() + HorizontalDivider() } }, ) { contentPadding -> diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/advanced/ClearDatabaseScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/advanced/ClearDatabaseScreen.kt index 013a7fa1b..f05b4bcf9 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/advanced/ClearDatabaseScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/advanced/ClearDatabaseScreen.kt @@ -15,6 +15,7 @@ import androidx.compose.material.icons.outlined.SelectAll import androidx.compose.material3.AlertDialog import androidx.compose.material3.Button import androidx.compose.material3.Checkbox +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.material3.TextButton @@ -49,7 +50,6 @@ import tachiyomi.data.Database import tachiyomi.domain.source.interactor.GetSourcesWithNonLibraryManga import tachiyomi.domain.source.model.Source import tachiyomi.domain.source.model.SourceWithCount -import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.components.material.Scaffold import tachiyomi.presentation.core.screens.EmptyScreen import tachiyomi.presentation.core.screens.LoadingScreen @@ -149,7 +149,7 @@ class ClearDatabaseScreen : Screen() { } } - Divider() + HorizontalDivider() Button( modifier = Modifier 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 e295f3281..fef522408 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 @@ -22,6 +22,7 @@ import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.CheckCircle +import androidx.compose.material3.DividerDefaults import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface @@ -44,7 +45,6 @@ import eu.kanade.presentation.theme.TachiyomiTheme import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.util.system.DeviceUtil import eu.kanade.tachiyomi.util.system.isDynamicColorAvailable -import tachiyomi.presentation.core.components.material.DIVIDER_ALPHA import tachiyomi.presentation.core.components.material.padding import tachiyomi.presentation.core.util.ThemePreviews import tachiyomi.presentation.core.util.secondaryItemAlpha @@ -123,7 +123,6 @@ fun AppThemePreviewItem( selected: Boolean, onClick: () -> Unit, ) { - val dividerColor = MaterialTheme.colorScheme.onSurface.copy(alpha = DIVIDER_ALPHA) Column( modifier = Modifier .fillMaxWidth() @@ -133,7 +132,7 @@ fun AppThemePreviewItem( color = if (selected) { MaterialTheme.colorScheme.primary } else { - dividerColor + DividerDefaults.color }, shape = RoundedCornerShape(17.dp), ) @@ -180,7 +179,7 @@ fun AppThemePreviewItem( modifier = Modifier .padding(start = 8.dp, top = 2.dp) .background( - color = dividerColor, + color = DividerDefaults.color, shape = MaterialTheme.shapes.small, ) .fillMaxWidth(0.5f) diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/widget/ListPreferenceWidget.kt b/app/src/main/java/eu/kanade/presentation/more/settings/widget/ListPreferenceWidget.kt index 7862ff9d0..fd2e40fae 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/widget/ListPreferenceWidget.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/widget/ListPreferenceWidget.kt @@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.selection.selectable import androidx.compose.material3.AlertDialog +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.MaterialTheme import androidx.compose.material3.RadioButton import androidx.compose.material3.Text @@ -25,7 +26,6 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import eu.kanade.tachiyomi.R import tachiyomi.presentation.core.components.ScrollbarLazyColumn -import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.util.isScrolledToEnd import tachiyomi.presentation.core.util.isScrolledToStart @@ -69,8 +69,8 @@ fun ListPreferenceWidget( } } } - if (!state.isScrolledToStart()) Divider(modifier = Modifier.align(Alignment.TopCenter)) - if (!state.isScrolledToEnd()) Divider(modifier = Modifier.align(Alignment.BottomCenter)) + if (!state.isScrolledToStart()) HorizontalDivider(modifier = Modifier.align(Alignment.TopCenter)) + if (!state.isScrolledToEnd()) HorizontalDivider(modifier = Modifier.align(Alignment.BottomCenter)) } }, confirmButton = { diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/widget/TriStateListDialog.kt b/app/src/main/java/eu/kanade/presentation/more/settings/widget/TriStateListDialog.kt index 82ababc88..87e3d7da0 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/widget/TriStateListDialog.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/widget/TriStateListDialog.kt @@ -15,6 +15,7 @@ import androidx.compose.material.icons.rounded.CheckBox import androidx.compose.material.icons.rounded.CheckBoxOutlineBlank import androidx.compose.material.icons.rounded.DisabledByDefault import androidx.compose.material3.AlertDialog +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.LocalContentColor import androidx.compose.material3.MaterialTheme @@ -29,7 +30,6 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import eu.kanade.tachiyomi.R -import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.util.isScrolledToEnd import tachiyomi.presentation.core.util.isScrolledToStart @@ -115,8 +115,8 @@ fun TriStateListDialog( } } - if (!listState.isScrolledToStart()) Divider(modifier = Modifier.align(Alignment.TopCenter)) - if (!listState.isScrolledToEnd()) Divider(modifier = Modifier.align(Alignment.BottomCenter)) + if (!listState.isScrolledToStart()) HorizontalDivider(modifier = Modifier.align(Alignment.TopCenter)) + if (!listState.isScrolledToEnd()) HorizontalDivider(modifier = Modifier.align(Alignment.BottomCenter)) } } }, diff --git a/app/src/main/java/eu/kanade/presentation/track/TrackInfoDialogHome.kt b/app/src/main/java/eu/kanade/presentation/track/TrackInfoDialogHome.kt index 39268ffbb..db1b242b3 100644 --- a/app/src/main/java/eu/kanade/presentation/track/TrackInfoDialogHome.kt +++ b/app/src/main/java/eu/kanade/presentation/track/TrackInfoDialogHome.kt @@ -24,11 +24,13 @@ import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.MoreVert import androidx.compose.material3.DropdownMenuItem +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.material3.TextButton +import androidx.compose.material3.VerticalDivider import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf @@ -50,8 +52,6 @@ import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.track.TrackService import eu.kanade.tachiyomi.ui.manga.track.TrackItem import eu.kanade.tachiyomi.util.system.copyToClipboard -import tachiyomi.presentation.core.components.material.Divider -import tachiyomi.presentation.core.components.material.VerticalDivider import java.text.DateFormat private const val UnsetStatusTextAlpha = 0.5F @@ -211,7 +211,7 @@ private fun TrackInfoItem( } if (onStartDateClick != null && onEndDateClick != null) { - Divider() + HorizontalDivider() Row(modifier = Modifier.height(IntrinsicSize.Min)) { TrackDetailsItem( modifier = Modifier.weight(1F), diff --git a/app/src/main/java/eu/kanade/presentation/track/TrackInfoDialogSelector.kt b/app/src/main/java/eu/kanade/presentation/track/TrackInfoDialogSelector.kt index ba2322ad8..a13112e5e 100644 --- a/app/src/main/java/eu/kanade/presentation/track/TrackInfoDialogSelector.kt +++ b/app/src/main/java/eu/kanade/presentation/track/TrackInfoDialogSelector.kt @@ -16,6 +16,7 @@ import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.selection.selectable import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.DatePicker +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.MaterialTheme import androidx.compose.material3.RadioButton import androidx.compose.material3.SelectableDates @@ -34,7 +35,6 @@ import tachiyomi.presentation.core.components.ScrollbarLazyColumn import tachiyomi.presentation.core.components.WheelNumberPicker import tachiyomi.presentation.core.components.WheelTextPicker import tachiyomi.presentation.core.components.material.AlertDialogContent -import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.components.material.padding import tachiyomi.presentation.core.util.isScrolledToEnd import tachiyomi.presentation.core.util.isScrolledToStart @@ -79,8 +79,8 @@ fun TrackStatusSelector( } } } - if (!state.isScrolledToStart()) Divider(modifier = Modifier.align(Alignment.TopCenter)) - if (!state.isScrolledToEnd()) Divider(modifier = Modifier.align(Alignment.BottomCenter)) + if (!state.isScrolledToStart()) HorizontalDivider(modifier = Modifier.align(Alignment.TopCenter)) + if (!state.isScrolledToEnd()) HorizontalDivider(modifier = Modifier.align(Alignment.BottomCenter)) }, onConfirm = onConfirm, onDismissRequest = onDismissRequest, diff --git a/app/src/main/java/eu/kanade/presentation/track/TrackServiceSearch.kt b/app/src/main/java/eu/kanade/presentation/track/TrackServiceSearch.kt index 8088168c4..201f87607 100644 --- a/app/src/main/java/eu/kanade/presentation/track/TrackServiceSearch.kt +++ b/app/src/main/java/eu/kanade/presentation/track/TrackServiceSearch.kt @@ -33,6 +33,7 @@ import androidx.compose.material.icons.filled.CheckCircle import androidx.compose.material.icons.filled.Close import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme @@ -60,7 +61,6 @@ import eu.kanade.presentation.manga.components.MangaCover import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.track.model.TrackSearch import tachiyomi.presentation.core.components.ScrollbarLazyColumn -import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.components.material.Scaffold import tachiyomi.presentation.core.components.material.padding import tachiyomi.presentation.core.screens.EmptyScreen @@ -143,7 +143,7 @@ fun TrackServiceSearch( } }, ) - Divider() + HorizontalDivider() } }, bottomBar = { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceScreen.kt index b5f461f5e..4f6e5d7a1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceScreen.kt @@ -14,6 +14,7 @@ import androidx.compose.material.icons.outlined.FilterList import androidx.compose.material.icons.outlined.NewReleases import androidx.compose.material3.FilterChip import androidx.compose.material3.FilterChipDefaults +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.SnackbarHost @@ -57,7 +58,6 @@ import kotlinx.coroutines.flow.receiveAsFlow import tachiyomi.core.Constants import tachiyomi.core.util.lang.launchIO import tachiyomi.domain.source.model.StubSource -import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.components.material.Scaffold import tachiyomi.presentation.core.components.material.padding import tachiyomi.source.local.LocalSource @@ -192,7 +192,7 @@ data class BrowseSourceScreen( } } - Divider() + HorizontalDivider() } }, snackbarHost = { SnackbarHost(hostState = snackbarHostState) }, diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterDialog.kt index 149194d93..f82f800ae 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterDialog.kt @@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.LocalTextStyle import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text @@ -28,7 +29,6 @@ import tachiyomi.presentation.core.components.SortItem import tachiyomi.presentation.core.components.TextItem import tachiyomi.presentation.core.components.TriStateItem import tachiyomi.presentation.core.components.material.Button -import tachiyomi.presentation.core.components.material.Divider @Composable fun SourceFilterDialog( @@ -68,7 +68,7 @@ fun SourceFilterDialog( Text(stringResource(R.string.action_filter)) } } - Divider() + HorizontalDivider() } items(filters) { @@ -85,7 +85,7 @@ private fun FilterItem(filter: Filter<*>, onUpdate: () -> Unit) { HeadingItem(filter.name) } is Filter.Separator -> { - Divider() + HorizontalDivider() } is Filter.CheckBox -> { CheckboxItem( diff --git a/gradle/androidx.versions.toml b/gradle/androidx.versions.toml index 7ed054975..b5ccd5c30 100644 --- a/gradle/androidx.versions.toml +++ b/gradle/androidx.versions.toml @@ -1,20 +1,20 @@ [versions] -agp_version = "8.0.2" +agp_version = "8.1.0" lifecycle_version = "2.6.1" -paging_version = "3.2.0-rc01" +paging_version = "3.2.0" [libraries] gradle = { module = "com.android.tools.build:gradle", version.ref = "agp_version" } -annotation = "androidx.annotation:annotation:1.7.0-alpha02" +annotation = "androidx.annotation:annotation:1.7.0-alpha03" appcompat = "androidx.appcompat:appcompat:1.6.1" biometricktx = "androidx.biometric:biometric-ktx:1.2.0-alpha05" constraintlayout = "androidx.constraintlayout:constraintlayout:2.1.4" -corektx = "androidx.core:core-ktx:1.11.0-beta02" +corektx = "androidx.core:core-ktx:1.12.0-beta01" splashscreen = "androidx.core:core-splashscreen:1.0.1" -recyclerview = "androidx.recyclerview:recyclerview:1.3.1-rc01" +recyclerview = "androidx.recyclerview:recyclerview:1.3.1" viewpager = "androidx.viewpager:viewpager:1.1.0-alpha01" -glance = "androidx.glance:glance-appwidget:1.0.0-beta01" +glance = "androidx.glance:glance-appwidget:1.0.0-rc01" profileinstaller = "androidx.profileinstaller:profileinstaller:1.3.1" lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", version.ref = "lifecycle_version" } diff --git a/gradle/compose.versions.toml b/gradle/compose.versions.toml index 01ee818ab..1bb8d0e44 100644 --- a/gradle/compose.versions.toml +++ b/gradle/compose.versions.toml @@ -1,6 +1,6 @@ [versions] -compiler = "1.5.0" -compose-bom = "2023.07.00-alpha01" +compiler = "1.5.1" +compose-bom = "2023.07.00-alpha02" accompanist = "0.31.5-beta" [libraries] diff --git a/gradle/kotlinx.versions.toml b/gradle/kotlinx.versions.toml index 82189ce32..5a5dd7310 100644 --- a/gradle/kotlinx.versions.toml +++ b/gradle/kotlinx.versions.toml @@ -7,7 +7,7 @@ xml_serialization_version = "0.86.1" reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin_version" } gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin_version" } -coroutines-bom = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-bom", version = "1.7.2" } +coroutines-bom = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-bom", version = "1.7.3" } coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core" } coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android" } coroutines-guava = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-guava" } diff --git a/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/Divider.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/Divider.kt deleted file mode 100644 index a434d6354..000000000 --- a/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/Divider.kt +++ /dev/null @@ -1,44 +0,0 @@ -package tachiyomi.presentation.core.components.material - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.fillMaxHeight -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.width -import androidx.compose.material3.DividerDefaults -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.alpha -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.dp - -const val DIVIDER_ALPHA = 0.2f - -@Composable -fun Divider( - modifier: Modifier = Modifier, - color: Color = DividerDefaults.color, -) { - Box( - modifier - .fillMaxWidth() - .height(1.dp) - .background(color = color) - .alpha(DIVIDER_ALPHA), - ) -} - -@Composable -fun VerticalDivider( - modifier: Modifier = Modifier, - color: Color = DividerDefaults.color, -) { - Box( - modifier - .fillMaxHeight() - .width(1.dp) - .background(color = color) - .alpha(DIVIDER_ALPHA), - ) -} diff --git a/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/SegmentedButtons.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/SegmentedButtons.kt deleted file mode 100644 index 7656af007..000000000 --- a/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/SegmentedButtons.kt +++ /dev/null @@ -1,90 +0,0 @@ -package tachiyomi.presentation.core.components.material - -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material3.OutlinedButton -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.remember -import androidx.compose.ui.Modifier -import androidx.compose.ui.text.style.TextOverflow -import androidx.compose.ui.tooling.preview.Preview - -val StartItemShape = RoundedCornerShape(topStartPercent = 100, bottomStartPercent = 100) -val MiddleItemShape = RoundedCornerShape(0) -val EndItemShape = RoundedCornerShape(topEndPercent = 100, bottomEndPercent = 100) - -@Composable -fun SegmentedButtons( - modifier: Modifier = Modifier, - entries: List, - selectedIndex: Int, - onClick: (Int) -> Unit, -) { - Row( - modifier = modifier, - ) { - entries.mapIndexed { index, label -> - val shape = remember(entries, index) { - when (index) { - 0 -> StartItemShape - entries.lastIndex -> EndItemShape - else -> MiddleItemShape - } - } - - if (index == selectedIndex) { - Button( - modifier = Modifier.weight(1f), - shape = shape, - onClick = { onClick(index) }, - ) { - Text( - text = label, - maxLines = 1, - overflow = TextOverflow.Ellipsis, - ) - } - } else { - OutlinedButton( - modifier = Modifier.weight(1f), - shape = shape, - onClick = { onClick(index) }, - ) { - Text( - text = label, - maxLines = 1, - overflow = TextOverflow.Ellipsis, - ) - } - } - } - } -} - -@Preview -@Composable -private fun SegmentedButtonsPreview() { - Column { - SegmentedButtons( - entries = listOf( - "Day", - "Week", - "Month", - "Year", - ), - selectedIndex = 1, - onClick = {}, - ) - - SegmentedButtons( - entries = listOf( - "Foo", - "Bar", - ), - selectedIndex = 1, - onClick = {}, - ) - } -}