Remove top app bar scroll behavior

This lets us make it more consistent with the Compose screens for now. Maybe it'll return in the future.

This also includes making the AboutController a full Compose controller with a new abstracted TopAppBar composable.
This commit is contained in:
arkon
2022-07-16 17:58:43 -04:00
parent 2096df301d
commit 80c7a45328
9 changed files with 168 additions and 155 deletions

View File

@@ -1,12 +1,15 @@
package eu.kanade.presentation.components
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.RowScope
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.filled.MoreVert
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.SmallTopAppBar
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
@@ -19,6 +22,30 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
import eu.kanade.tachiyomi.R
@Composable
fun TopAppBar(
title: String?,
subtitle: String? = null,
navigateUp: () -> Unit,
navigationIcon: ImageVector = Icons.Default.ArrowBack,
actions: @Composable RowScope.() -> Unit = {},
) {
SmallTopAppBar(
navigationIcon = {
IconButton(onClick = navigateUp) {
Icon(
imageVector = navigationIcon,
contentDescription = stringResource(R.string.abc_action_bar_up_description),
)
}
},
title = {
AppBarTitle(title, subtitle)
},
actions = actions,
)
}
@Composable
fun AppBarTitle(
title: String?,