Fix DrawerContent ColorScheme
* Fix listItemOnDrawerColor() * Fix topBarOnDrawerColor * Refine location --------- Co-authored-by: Dude so hot <djohn@fbi.gov>
This commit is contained in:
1 parent
f4771d4ddb
commit
94da911f93
4 files changed
+27
No files matched your search
@@ -218,6 +218,7 @@ fun AnimatedVisibilityScope.DownloadsScreen(navigator: DestinationsNavigator) =
|
||||
TopAppBar(
|
||||
title = { Text(text = labelsStr) },
|
||||
windowInsets = EmptyWindowInsets,
|
||||
colors = topBarOnDrawerColor(),
|
||||
actions = {
|
||||
if (DownloadsFilterMode.CUSTOM == filterMode) {
|
||||
IconButton(
|
||||
@@ -314,6 +315,7 @@ fun AnimatedVisibilityScope.DownloadsScreen(navigator: DestinationsNavigator) =
|
||||
headlineContent = {
|
||||
Text("$allName [$totalCount]")
|
||||
},
|
||||
colors = listItemOnDrawerColor(),
|
||||
)
|
||||
}
|
||||
item {
|
||||
@@ -327,6 +329,7 @@ fun AnimatedVisibilityScope.DownloadsScreen(navigator: DestinationsNavigator) =
|
||||
headlineContent = {
|
||||
Text("$emptyLabelName [${downloadsCount.getOrDefault(null, 0)}]")
|
||||
},
|
||||
colors = listItemOnDrawerColor(),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -431,6 +434,7 @@ fun AnimatedVisibilityScope.DownloadsScreen(navigator: DestinationsNavigator) =
|
||||
}
|
||||
}
|
||||
},
|
||||
colors = listItemOnDrawerColor(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.hippo.ehviewer.ui.screen
|
||||
|
||||
import androidx.compose.material3.ListItemDefaults
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.TopAppBarDefaults
|
||||
import androidx.compose.runtime.Composable
|
||||
|
||||
@Composable
|
||||
fun listItemOnDrawerColor() = ListItemDefaults.colors(
|
||||
containerColor = MaterialTheme.colorScheme.surfaceContainerLow,
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun topBarOnDrawerColor() = TopAppBarDefaults.topAppBarColors(
|
||||
containerColor = MaterialTheme.colorScheme.surfaceContainerLow,
|
||||
scrolledContainerColor = MaterialTheme.colorScheme.surfaceContainerHigh,
|
||||
)
|
||||
@@ -188,6 +188,7 @@ fun AnimatedVisibilityScope.FavouritesScreen(navigator: DestinationsNavigator) =
|
||||
TopAppBar(
|
||||
title = { Text(text = stringResource(id = R.string.collections)) },
|
||||
windowInsets = EmptyWindowInsets,
|
||||
colors = topBarOnDrawerColor(),
|
||||
)
|
||||
val scope = currentRecomposeScope
|
||||
LaunchedEffect(Unit) {
|
||||
@@ -219,6 +220,7 @@ fun AnimatedVisibilityScope.FavouritesScreen(navigator: DestinationsNavigator) =
|
||||
Settings.recentFavCat = newCat
|
||||
launch { sheetState.close() }
|
||||
},
|
||||
colors = listItemOnDrawerColor(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,6 +255,7 @@ fun AnimatedVisibilityScope.GalleryListScreen(lub: ListUrlBuilder, navigator: De
|
||||
TopAppBar(
|
||||
title = { Text(text = stringResource(id = R.string.toplist)) },
|
||||
windowInsets = EmptyWindowInsets,
|
||||
colors = topBarOnDrawerColor(),
|
||||
)
|
||||
toplists.forEach { (name, keyword) ->
|
||||
ListItem(
|
||||
@@ -267,6 +268,7 @@ fun AnimatedVisibilityScope.GalleryListScreen(lub: ListUrlBuilder, navigator: De
|
||||
headlineContent = {
|
||||
Text(text = name)
|
||||
},
|
||||
colors = listItemOnDrawerColor(),
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -274,6 +276,7 @@ fun AnimatedVisibilityScope.GalleryListScreen(lub: ListUrlBuilder, navigator: De
|
||||
ProvideSideSheetContent { sheetState ->
|
||||
TopAppBar(
|
||||
title = { Text(text = stringResource(id = R.string.quick_search)) },
|
||||
colors = topBarOnDrawerColor(),
|
||||
actions = {
|
||||
IconButton(onClick = {
|
||||
launch {
|
||||
@@ -437,6 +440,7 @@ fun AnimatedVisibilityScope.GalleryListScreen(lub: ListUrlBuilder, navigator: De
|
||||
Icon(imageVector = Icons.Default.Reorder, contentDescription = null)
|
||||
}
|
||||
},
|
||||
colors = listItemOnDrawerColor(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user