Move floating TTS controls above reader menu
Build & Test / Build & Test App (push) Has been cancelled
Release / Extract tag name (push) Has been cancelled
Update website / update_website (release) Has been cancelled
Release / Build (push) Has been cancelled
Release / Build (FOSS) (push) Has been cancelled
Release / Create GitHub Release (push) Has been cancelled
Build & Test / Build & Test App (push) Has been cancelled
Release / Extract tag name (push) Has been cancelled
Update website / update_website (release) Has been cancelled
Release / Build (push) Has been cancelled
Release / Build (FOSS) (push) Has been cancelled
Release / Create GitHub Release (push) Has been cancelled
This commit is contained in:
@@ -20,6 +20,8 @@ import android.view.WindowManager
|
||||
import android.widget.Toast
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.activity.viewModels
|
||||
import androidx.compose.animation.core.animateDpAsState
|
||||
import androidx.compose.animation.core.tween
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
@@ -310,11 +312,16 @@ class ReaderActivity : BaseActivity() {
|
||||
ttsState.readerChapterId == state.currentChapter?.chapter?.id &&
|
||||
state.currentChapter?.pages?.any { it is TextReaderPage } == true
|
||||
if (showFloatingTts) {
|
||||
val floatingTtsBottomPadding by animateDpAsState(
|
||||
targetValue = if (state.menuVisible) 144.dp else 72.dp,
|
||||
animationSpec = tween(durationMillis = 200),
|
||||
label = "floatingTtsBottomPadding",
|
||||
)
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.align(Alignment.BottomEnd)
|
||||
.navigationBarsPadding()
|
||||
.padding(end = 18.dp, bottom = 72.dp),
|
||||
.padding(end = 18.dp, bottom = floatingTtsBottomPadding),
|
||||
horizontalArrangement = Arrangement.spacedBy(10.dp),
|
||||
) {
|
||||
IconButton(
|
||||
|
||||
Reference in New Issue
Block a user