From 43307229cb6fbd7b28f690628ea3eb747d357efe Mon Sep 17 00:00:00 2001 From: Barnabas Balogh Date: Mon, 16 Feb 2026 19:56:19 +0100 Subject: [PATCH] feat: Decrease gesture zone, so it does conflict with system gestures. --- .../java/hu/bbara/purefin/player/ui/PlayerScreen.kt | 2 +- .../player/ui/components/PlayerGesturesLayer.kt | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/hu/bbara/purefin/player/ui/PlayerScreen.kt b/app/src/main/java/hu/bbara/purefin/player/ui/PlayerScreen.kt index 897f783..07d533c 100644 --- a/app/src/main/java/hu/bbara/purefin/player/ui/PlayerScreen.kt +++ b/app/src/main/java/hu/bbara/purefin/player/ui/PlayerScreen.kt @@ -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) }, diff --git a/app/src/main/java/hu/bbara/purefin/player/ui/components/PlayerGesturesLayer.kt b/app/src/main/java/hu/bbara/purefin/player/ui/components/PlayerGesturesLayer.kt index b6a8002..c5d279d 100644 --- a/app/src/main/java/hu/bbara/purefin/player/ui/components/PlayerGesturesLayer.kt +++ b/app/src/main/java/hu/bbara/purefin/player/ui/components/PlayerGesturesLayer.kt @@ -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() },