mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-13 12:38:58 +01:00
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:
@@ -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?,
|
||||
|
||||
Reference in New Issue
Block a user