mirror of
https://github.com/bbara04/Purefin.git
synced 2026-03-31 17:10:08 +02:00
fix: fix gesture layout
This commit is contained in:
@@ -39,12 +39,12 @@ import androidx.media3.ui.AspectRatioFrameLayout
|
||||
import androidx.media3.ui.PlayerView
|
||||
import hu.bbara.purefin.common.ui.components.EmptyValueTimedVisibility
|
||||
import hu.bbara.purefin.common.ui.components.ValueChangeTimedVisibility
|
||||
import hu.bbara.purefin.player.ui.components.PersistentOverlayContainer
|
||||
import hu.bbara.purefin.player.ui.components.PlayerAdjustmentIndicator
|
||||
import hu.bbara.purefin.player.ui.components.PlayerControlsOverlay
|
||||
import hu.bbara.purefin.player.ui.components.PlayerGesturesLayer
|
||||
import hu.bbara.purefin.player.ui.components.PlayerLoadingErrorEndCard
|
||||
import hu.bbara.purefin.player.ui.components.PlayerQueuePanel
|
||||
import hu.bbara.purefin.player.ui.components.PersistentOverlayContainer
|
||||
import hu.bbara.purefin.player.ui.components.rememberPersistentOverlayController
|
||||
import hu.bbara.purefin.player.viewmodel.PlayerViewModel
|
||||
import kotlin.math.abs
|
||||
@@ -98,7 +98,7 @@ fun PlayerScreen(
|
||||
)
|
||||
|
||||
PlayerGesturesLayer(
|
||||
modifier = Modifier.align(Alignment.Center),
|
||||
modifier = Modifier.align(Alignment.BottomCenter),
|
||||
onTap = { viewModel.toggleControlsVisibility() },
|
||||
onDoubleTapRight = { viewModel.seekBy(30_000) },
|
||||
onDoubleTapLeft = { viewModel.seekBy(-10_000) },
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package hu.bbara.purefin.player.ui.components
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.gestures.awaitEachGesture
|
||||
import androidx.compose.foundation.gestures.awaitFirstDown
|
||||
import androidx.compose.foundation.gestures.detectTapGestures
|
||||
@@ -10,7 +11,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.geometry.Offset
|
||||
import androidx.compose.ui.input.pointer.PointerInputChange
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.input.pointer.pointerInput
|
||||
import androidx.compose.ui.input.pointer.positionChange
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
@@ -37,7 +38,8 @@ fun PlayerGesturesLayer(
|
||||
Box(
|
||||
modifier = modifier
|
||||
.fillMaxWidth(0.90f)
|
||||
.fillMaxHeight(0.70f)
|
||||
.fillMaxHeight(0.88f)
|
||||
.background(Color(1f, 1f, 1f, 0.5f))
|
||||
.pointerInput(Unit) {
|
||||
detectTapGestures(
|
||||
onTap = { onTap() },
|
||||
|
||||
Reference in New Issue
Block a user