style: Make compose topAppBar consistent with legacy

This commit is contained in:
Ahmad Ansori Palembani 2024-06-10 19:18:40 +07:00
parent e8d4e3ef18
commit 1a0ee24c63
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
2 changed files with 2 additions and 2 deletions

View file

@ -108,7 +108,7 @@ fun YokaiScaffold(
fun getTopAppBarColor(title: String): Color { fun getTopAppBarColor(title: String): Color {
return when (title.isEmpty()) { return when (title.isEmpty()) {
true -> Color.Transparent true -> Color.Transparent
false -> MaterialTheme.colorScheme.surface.copy(alpha = .7f) false -> MaterialTheme.colorScheme.surface
} }
} }

View file

@ -48,7 +48,7 @@ fun SettingsScaffold(
title = title, title = title,
appBarType = appBarType ?: if (useLargeAppBar) AppBarType.LARGE else AppBarType.SMALL, appBarType = appBarType ?: if (useLargeAppBar) AppBarType.LARGE else AppBarType.SMALL,
actions = appBarActions, actions = appBarActions,
scrollBehavior = TopAppBarDefaults.enterAlwaysScrollBehavior( scrollBehavior = TopAppBarDefaults.exitUntilCollapsedScrollBehavior(
state = rememberTopAppBarState(), state = rememberTopAppBarState(),
canScroll = { listState.firstVisibleItemIndex > 0 || listState.firstVisibleItemScrollOffset > 0 }, canScroll = { listState.firstVisibleItemIndex > 0 || listState.firstVisibleItemScrollOffset > 0 },
), ),