feat: Decrease gesture zone, so it does conflict with system gestures.

This commit is contained in:
2026-02-16 19:56:19 +01:00
parent ebf70343ed
commit 43307229cb
2 changed files with 10 additions and 2 deletions

View File

@@ -98,7 +98,7 @@ fun PlayerScreen(
)
PlayerGesturesLayer(
modifier = Modifier.fillMaxSize(),
modifier = Modifier.align(Alignment.Center),
onTap = { viewModel.toggleControlsVisibility() },
onDoubleTapRight = { viewModel.seekBy(30_000) },
onDoubleTapLeft = { viewModel.seekBy(-10_000) },

View File

@@ -1,14 +1,20 @@
package hu.bbara.purefin.player.ui.components
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.gestures.detectDragGestures
import androidx.compose.foundation.gestures.detectHorizontalDragGestures
import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.dp
import hu.bbara.purefin.player.helper.HorizontalSeekGestureHelper
@Composable
@@ -28,7 +34,9 @@ fun PlayerGesturesLayer(
Box(
modifier = modifier
.fillMaxSize()
.fillMaxWidth(0.90f)
.fillMaxHeight(0.70f)
// .background(Color(2f, 2f, 2f, 0.3f))
.pointerInput(Unit) {
detectTapGestures(
onTap = { onTap() },