Skip to content

Commit 4d4fe70

Browse files
committed
Make it clearer when items are being dragged under the finger
1 parent e0c8719 commit 4d4fe70

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

app/src/main/java/org/schabi/newpipe/ui/components/menu/LongPressMenuEditor.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ package org.schabi.newpipe.ui.components.menu
2121
import android.util.Log
2222
import androidx.annotation.StringRes
2323
import androidx.compose.foundation.BorderStroke
24+
import androidx.compose.foundation.background
2425
import androidx.compose.foundation.border
2526
import androidx.compose.foundation.gestures.scrollBy
2627
import androidx.compose.foundation.layout.BoxWithConstraints
@@ -431,16 +432,18 @@ fun LongPressMenuEditor(modifier: Modifier = Modifier) {
431432
}
432433
}
433434
if (activeDragItem != null) {
435+
// draw it the same size as the selected item,
434436
val size = with(LocalDensity.current) {
435437
remember(activeDragSize) { activeDragSize.toSize().toDpSize() }
436438
}
437439
ItemInListUi(
438440
item = activeDragItem!!,
439-
selected = false,
441+
selected = true,
440442
modifier = Modifier
441443
.size(size)
442444
.offset { activeDragPosition }
443-
.offset(-size.width / 2, -size.height / 2),
445+
.offset(-size.width / 2, -size.height / 2)
446+
.offset((-24).dp, (-24).dp),
444447
)
445448
}
446449
}

0 commit comments

Comments
 (0)