VerticalFastScroller: Fix incorrect touch target (#7384)
This commit is contained in:
parent
c33e5c8a17
commit
9ff6ae81bd
@ -114,18 +114,6 @@ fun VerticalFastScroller(
|
|||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.offset { IntOffset(0, thumbOffsetY.roundToInt()) }
|
.offset { IntOffset(0, thumbOffsetY.roundToInt()) }
|
||||||
.height(ThumbLength)
|
|
||||||
.then(
|
|
||||||
// Exclude thumb from gesture area only when needed
|
|
||||||
if (isThumbVisible && !isThumbDragged && !listState.isScrollInProgress) {
|
|
||||||
Modifier.systemGestureExclusion()
|
|
||||||
} else Modifier,
|
|
||||||
)
|
|
||||||
.padding(horizontal = 8.dp)
|
|
||||||
.padding(end = endContentPadding)
|
|
||||||
.width(ThumbThickness)
|
|
||||||
.alpha(alpha.value)
|
|
||||||
.background(color = thumbColor, shape = ThumbShape)
|
|
||||||
.then(
|
.then(
|
||||||
// Recompose opts
|
// Recompose opts
|
||||||
if (!listState.isScrollInProgress) {
|
if (!listState.isScrollInProgress) {
|
||||||
@ -139,7 +127,19 @@ fun VerticalFastScroller(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
} else Modifier,
|
} else Modifier,
|
||||||
),
|
)
|
||||||
|
.then(
|
||||||
|
// Exclude thumb from gesture area only when needed
|
||||||
|
if (isThumbVisible && !isThumbDragged && !listState.isScrollInProgress) {
|
||||||
|
Modifier.systemGestureExclusion()
|
||||||
|
} else Modifier,
|
||||||
|
)
|
||||||
|
.height(ThumbLength)
|
||||||
|
.padding(horizontal = 8.dp)
|
||||||
|
.padding(end = endContentPadding)
|
||||||
|
.width(ThumbThickness)
|
||||||
|
.alpha(alpha.value)
|
||||||
|
.background(color = thumbColor, shape = ThumbShape),
|
||||||
)
|
)
|
||||||
}.map { it.measure(scrollerConstraints) }
|
}.map { it.measure(scrollerConstraints) }
|
||||||
val scrollerWidth = scrollerPlaceable.fastMaxBy { it.width }?.width ?: 0
|
val scrollerWidth = scrollerPlaceable.fastMaxBy { it.width }?.width ?: 0
|
||||||
|
Loading…
Reference in New Issue
Block a user