Removed drag icon in interactive rebase
This commit is contained in:
parent
2e0b4c143f
commit
7df9d93c5c
@ -207,14 +207,6 @@ fun RebaseCommit(
|
|||||||
.padding(horizontal = 16.dp, vertical = 8.dp),
|
.padding(horizontal = 16.dp, vertical = 8.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
Icon(
|
|
||||||
painterResource(AppIcons.DRAG),
|
|
||||||
contentDescription = "Drag commit",
|
|
||||||
tint = MaterialTheme.colors.onBackground,
|
|
||||||
modifier = Modifier.size(24.dp)
|
|
||||||
.handOnHover(),
|
|
||||||
)
|
|
||||||
|
|
||||||
ActionDropdown(
|
ActionDropdown(
|
||||||
action,
|
action,
|
||||||
isFirst = isFirst,
|
isFirst = isFirst,
|
||||||
|
@ -242,7 +242,6 @@ class VerticalDragDropState internal constructor(
|
|||||||
val startOffset = draggingItem.offset + draggingItemOffset
|
val startOffset = draggingItem.offset + draggingItemOffset
|
||||||
val endOffset = startOffset + draggingItem.size
|
val endOffset = startOffset + draggingItem.size
|
||||||
val middleOffset = startOffset + (endOffset - startOffset) / 2f
|
val middleOffset = startOffset + (endOffset - startOffset) / 2f
|
||||||
println("Middle offset is $middleOffset")
|
|
||||||
|
|
||||||
val targetItem = state.layoutInfo.visibleItemsInfo.find { item ->
|
val targetItem = state.layoutInfo.visibleItemsInfo.find { item ->
|
||||||
middleOffset.toInt() in item.offset..item.offsetEnd &&
|
middleOffset.toInt() in item.offset..item.offsetEnd &&
|
||||||
@ -314,7 +313,6 @@ fun Modifier.horizontalDragContainer(dragDropState: HorizontalDragDropState, onD
|
|||||||
@Composable
|
@Composable
|
||||||
fun Modifier.verticalDragContainer(dragDropState: VerticalDragDropState, onDraggedItem: (Int) -> Unit): Modifier {
|
fun Modifier.verticalDragContainer(dragDropState: VerticalDragDropState, onDraggedItem: (Int) -> Unit): Modifier {
|
||||||
val state = rememberDraggableState {
|
val state = rememberDraggableState {
|
||||||
println("Dragging vertically $it")
|
|
||||||
dragDropState.onDrag(Offset(0f, it))
|
dragDropState.onDrag(Offset(0f, it))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,7 +330,6 @@ fun Modifier.verticalDragContainer(dragDropState: VerticalDragDropState, onDragg
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onDragStopped = {
|
onDragStopped = {
|
||||||
println("On drag stopped")
|
|
||||||
dragDropState.onDragInterrupted()
|
dragDropState.onDragInterrupted()
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user