mirror of
https://github.com/bbara04/Purefin.git
synced 2026-04-01 01:30:08 +02:00
feat: Decrease gesture zone, so it does conflict with system gestures.
This commit is contained in:
@@ -98,7 +98,7 @@ fun PlayerScreen(
|
|||||||
)
|
)
|
||||||
|
|
||||||
PlayerGesturesLayer(
|
PlayerGesturesLayer(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.align(Alignment.Center),
|
||||||
onTap = { viewModel.toggleControlsVisibility() },
|
onTap = { viewModel.toggleControlsVisibility() },
|
||||||
onDoubleTapRight = { viewModel.seekBy(30_000) },
|
onDoubleTapRight = { viewModel.seekBy(30_000) },
|
||||||
onDoubleTapLeft = { viewModel.seekBy(-10_000) },
|
onDoubleTapLeft = { viewModel.seekBy(-10_000) },
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
package hu.bbara.purefin.player.ui.components
|
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.detectDragGestures
|
||||||
import androidx.compose.foundation.gestures.detectHorizontalDragGestures
|
import androidx.compose.foundation.gestures.detectHorizontalDragGestures
|
||||||
import androidx.compose.foundation.gestures.detectTapGestures
|
import androidx.compose.foundation.gestures.detectTapGestures
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.input.pointer.pointerInput
|
import androidx.compose.ui.input.pointer.pointerInput
|
||||||
import androidx.compose.ui.platform.LocalDensity
|
import androidx.compose.ui.platform.LocalDensity
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
import hu.bbara.purefin.player.helper.HorizontalSeekGestureHelper
|
import hu.bbara.purefin.player.helper.HorizontalSeekGestureHelper
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@@ -28,7 +34,9 @@ fun PlayerGesturesLayer(
|
|||||||
|
|
||||||
Box(
|
Box(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.fillMaxSize()
|
.fillMaxWidth(0.90f)
|
||||||
|
.fillMaxHeight(0.70f)
|
||||||
|
// .background(Color(2f, 2f, 2f, 0.3f))
|
||||||
.pointerInput(Unit) {
|
.pointerInput(Unit) {
|
||||||
detectTapGestures(
|
detectTapGestures(
|
||||||
onTap = { onTap() },
|
onTap = { onTap() },
|
||||||
|
|||||||
Reference in New Issue
Block a user