🛠️ Primary scrollbar in ModalDrawer

* Replaced Secondary scrollbar with Primary in ModalDrawer
This commit is contained in:
Acclorite 2024-10-06 11:15:57 +03:00
parent 89e2f0a326
commit 93aa5bc081
3 changed files with 5 additions and 2 deletions

View file

@ -33,6 +33,7 @@ import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import ua.acclorite.book_story.presentation.core.components.CustomAnimatedVisibility import ua.acclorite.book_story.presentation.core.components.CustomAnimatedVisibility
import ua.acclorite.book_story.presentation.core.components.CustomLazyColumn import ua.acclorite.book_story.presentation.core.components.CustomLazyColumn
import ua.acclorite.book_story.presentation.core.constants.Constants
import ua.acclorite.book_story.presentation.core.util.noRippleClickable import ua.acclorite.book_story.presentation.core.util.noRippleClickable
/** /**
@ -126,6 +127,7 @@ fun CustomModalDrawer(
CustomLazyColumn( CustomLazyColumn(
state = rememberLazyListState(startIndex), state = rememberLazyListState(startIndex),
modifier = Modifier.fillMaxSize(), modifier = Modifier.fillMaxSize(),
scrollbarSettings = Constants.PRIMARY_SCROLLBAR,
contentPadding = PaddingValues(vertical = 9.dp) contentPadding = PaddingValues(vertical = 9.dp)
) { ) {
content() content()

View file

@ -38,7 +38,7 @@ fun CustomModalDrawerSelectableItem(
) { ) {
Row( Row(
modifier = modifier modifier = modifier
.padding(horizontal = 8.dp) .padding(horizontal = 12.dp)
.fillMaxWidth() .fillMaxWidth()
.clip(CircleShape) .clip(CircleShape)
.background( .background(

View file

@ -664,9 +664,10 @@ private fun provideEmptyChapter() = Chapter(
@Composable @Composable
private fun providePrimaryScrollbar() = ScrollbarSettings( private fun providePrimaryScrollbar() = ScrollbarSettings(
thumbUnselectedColor = MaterialTheme.colorScheme.primary, thumbUnselectedColor = MaterialTheme.colorScheme.primary,
thumbSelectedColor = MaterialTheme.colorScheme.primary.copy(0.8f),
hideDelayMillis = 2000, hideDelayMillis = 2000,
durationAnimationMillis = 300, durationAnimationMillis = 300,
selectionMode = ScrollbarSelectionMode.Disabled, selectionMode = ScrollbarSelectionMode.Thumb,
thumbThickness = 8.dp, thumbThickness = 8.dp,
scrollbarPadding = 4.dp scrollbarPadding = 4.dp
) )