🛠️ Primary scrollbar in ModalDrawer
* Replaced Secondary scrollbar with Primary in ModalDrawer
This commit is contained in:
parent
89e2f0a326
commit
93aa5bc081
3 changed files with 5 additions and 2 deletions
|
|
@ -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()
|
||||||
|
|
|
||||||
|
|
@ -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(
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue