🛠️ 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 ua.acclorite.book_story.presentation.core.components.CustomAnimatedVisibility
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
/**
@ -126,6 +127,7 @@ fun CustomModalDrawer(
CustomLazyColumn(
state = rememberLazyListState(startIndex),
modifier = Modifier.fillMaxSize(),
scrollbarSettings = Constants.PRIMARY_SCROLLBAR,
contentPadding = PaddingValues(vertical = 9.dp)
) {
content()

View file

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

View file

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