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() },