manager: fix SearchPager color

This commit is contained in:
YuKongA
2025-11-27 08:36:51 +08:00
committed by shirkneko
parent ccb38061ee
commit 314fbe8cf7
2 changed files with 9 additions and 8 deletions

View File

@@ -128,7 +128,7 @@ class SearchStatus(val label: String) {
noiseFactor = 0f noiseFactor = 0f
} }
} else { } else {
Modifier.background(colorScheme.background) Modifier.background(colorScheme.surface)
} }
) )
) )
@@ -228,7 +228,7 @@ fun SearchStatus.SearchPager(
) { ) {
searchStatus.onAnimationComplete() searchStatus.onAnimationComplete()
} }
val backgroundAlpha by animateFloatAsState( val surfaceAlpha by animateFloatAsState(
if (searchStatus.shouldExpand()) 1f else 0f, if (searchStatus.shouldExpand()) 1f else 0f,
animationSpec = tween(200, easing = FastOutSlowInEasing) animationSpec = tween(200, easing = FastOutSlowInEasing)
) )
@@ -237,7 +237,7 @@ fun SearchStatus.SearchPager(
modifier = Modifier modifier = Modifier
.fillMaxSize() .fillMaxSize()
.zIndex(5f) .zIndex(5f)
.background(colorScheme.background.copy(alpha = backgroundAlpha)) .background(colorScheme.surface.copy(alpha = surfaceAlpha))
.semantics { onClick { false } } .semantics { onClick { false } }
.then( .then(
if (!searchStatus.isCollapsed()) Modifier.pointerInput(Unit) { } else Modifier if (!searchStatus.isCollapsed()) Modifier.pointerInput(Unit) { } else Modifier
@@ -248,7 +248,7 @@ fun SearchStatus.SearchPager(
.fillMaxWidth() .fillMaxWidth()
.padding(top = topPadding) .padding(top = topPadding)
.then( .then(
if (!searchStatus.isCollapsed()) Modifier.background(colorScheme.background) if (!searchStatus.isCollapsed()) Modifier.background(colorScheme.surface)
else Modifier else Modifier
), ),
horizontalArrangement = Arrangement.Start, horizontalArrangement = Arrangement.Start,
@@ -258,7 +258,7 @@ fun SearchStatus.SearchPager(
Box( Box(
modifier = Modifier modifier = Modifier
.weight(1f) .weight(1f)
.background(colorScheme.background) .background(colorScheme.surface)
) { ) {
expandBar(searchStatus, searchBarTopPadding) expandBar(searchStatus, searchBarTopPadding)
} }

View File

@@ -212,6 +212,9 @@ fun SuperUserPager(
defaultResult = {}, defaultResult = {},
searchBarTopPadding = dynamicTopPadding, searchBarTopPadding = dynamicTopPadding,
) { ) {
item {
Spacer(Modifier.height(6.dp))
}
items(searchGroups, key = { it.uid }) { group -> items(searchGroups, key = { it.uid }) { group ->
val expanded = expandedSearchUids.value.contains(group.uid) val expanded = expandedSearchUids.value.contains(group.uid)
AnimatedVisibility( AnimatedVisibility(
@@ -219,9 +222,7 @@ fun SuperUserPager(
enter = fadeIn() + expandVertically(), enter = fadeIn() + expandVertically(),
exit = fadeOut() + shrinkVertically() exit = fadeOut() + shrinkVertically()
) { ) {
Column( Column {
Modifier.padding(top = 6.dp)
) {
GroupItem( GroupItem(
group = group, group = group,
onToggleExpand = { onToggleExpand = {