fix: status bar color for light theme (#826)

This commit is contained in:
Diego Beraldin 2024-05-10 22:29:57 +02:00 committed by GitHub
parent 52a76a2daf
commit eaff49d31e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 7 deletions

View File

@ -23,12 +23,7 @@ class DefaultBarColorProvider : BarColorProvider {
}
val barColor = when (barTheme) {
UiBarTheme.Opaque -> baseColor.copy(alpha = 0.25f)
UiBarTheme.Transparent -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
Color.Transparent
} else {
baseColor
}
UiBarTheme.Transparent -> baseColor.copy(alpha = 0.01f)
else -> baseColor
}.toArgb()
statusBarColor = barColor

View File

@ -13,6 +13,7 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import com.github.diegoberaldin.raccoonforlemmy.core.appearance.theme.Spacing
import com.github.diegoberaldin.raccoonforlemmy.core.appearance.theme.ancillaryTextAlpha
@ -35,8 +36,9 @@ fun BottomSheetHeader(
bottom = Spacing.xs,
),
text = title,
color = MaterialTheme.colorScheme.onBackground,
textAlign = TextAlign.Center,
style = MaterialTheme.typography.titleLarge,
color = MaterialTheme.colorScheme.onBackground,
)
}
}