Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
Fix topbar search content color
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkitSuda committed Nov 25, 2022
1 parent a4482f4 commit f07087f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ fun TopSearchBar(
leftBackBtnEnabled: Boolean = true,
rightClearBtnEnabled: Boolean = true,
) {
val contentColor = LocalThemeState.current.topBarContentColor

var clearBtnWidth by remember {
mutableStateOf(0)
Expand All @@ -219,13 +220,13 @@ fun TopSearchBar(
Icon(
imageVector = Icons.Outlined.ArrowBack,
contentDescription = stringResource(R.string.back),
tint = /*if (backgroundColor.isDark()) Color.White else*/ ReboundTheme.colors.onBackground,
tint = contentColor,
)
}
// TextField
TextField(
colors = TextFieldDefaults.textFieldColors(
textColor = /*if (backgroundColor.isDark()) Color.White else*/ Color.Black,
textColor = contentColor,
disabledTextColor = Color.Transparent,
backgroundColor = Color.Transparent,
focusedIndicatorColor = Color.Transparent,
Expand Down Expand Up @@ -259,7 +260,7 @@ fun TopSearchBar(
clearBtnWidth = it.parentCoordinates!!.size.width
}) {
Icon(
tint = /*if (backgroundColor.isDark()) Color.White else*/ Color.Black,
tint = contentColor,
imageVector = Icons.Outlined.Close,
contentDescription = stringResource(R.string.clear)
)
Expand All @@ -279,8 +280,7 @@ fun TopBarIconButton(
onClick: () -> Unit
) {
val alpha by animateFloatAsState(targetValue = if (enabled) 1f else 0.5f)
// val contentColor by viewModel.contentColor.collectAsState(ReboundTheme.colors.onBackground)
val contentColor = ReboundTheme.colors.onBackground
val contentColor = LocalThemeState.current.topBarContentColor

IconButton(
onClick = onClick,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ private fun ExercisesScreenContent(
onChangeSearchTerm(it)
},
)

}
},
) {
Expand Down

0 comments on commit f07087f

Please sign in to comment.