Force theme and colors in WaitListView.
This commit is contained in:
parent
e7de13a1bc
commit
182e0ebf97
1 changed files with 65 additions and 61 deletions
|
|
@ -29,7 +29,9 @@ import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.systemBarsPadding
|
import androidx.compose.foundation.layout.systemBarsPadding
|
||||||
import androidx.compose.foundation.layout.widthIn
|
import androidx.compose.foundation.layout.widthIn
|
||||||
|
import androidx.compose.material3.LocalContentColor
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.runtime.CompositionLocalProvider
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.BiasAbsoluteAlignment
|
import androidx.compose.ui.BiasAbsoluteAlignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -131,6 +133,9 @@ private fun WaitListContent(
|
||||||
state: WaitListState,
|
state: WaitListState,
|
||||||
onCancelClicked: () -> Unit,
|
onCancelClicked: () -> Unit,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
|
) {
|
||||||
|
ElementTheme(
|
||||||
|
darkTheme = true
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
|
|
@ -139,7 +144,7 @@ private fun WaitListContent(
|
||||||
.padding(horizontal = 16.dp, vertical = 16.dp)
|
.padding(horizontal = 16.dp, vertical = 16.dp)
|
||||||
) {
|
) {
|
||||||
if (state.loginAction !is Async.Success) {
|
if (state.loginAction !is Async.Success) {
|
||||||
ElementTheme(darkTheme = true) {
|
CompositionLocalProvider(LocalContentColor provides Color.Black) {
|
||||||
TextButton(
|
TextButton(
|
||||||
text = stringResource(CommonStrings.action_cancel),
|
text = stringResource(CommonStrings.action_cancel),
|
||||||
onClick = onCancelClicked,
|
onClick = onCancelClicked,
|
||||||
|
|
@ -160,7 +165,7 @@ private fun WaitListContent(
|
||||||
CircularProgressIndicator(
|
CircularProgressIndicator(
|
||||||
modifier = Modifier.size(24.dp),
|
modifier = Modifier.size(24.dp),
|
||||||
strokeWidth = 2.dp,
|
strokeWidth = 2.dp,
|
||||||
color = Color.White
|
color = ElementTheme.colors.iconPrimary
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
Spacer(modifier = Modifier.height(24.dp))
|
Spacer(modifier = Modifier.height(24.dp))
|
||||||
|
|
@ -174,7 +179,7 @@ private fun WaitListContent(
|
||||||
text = withColoredPeriod(titleRes),
|
text = withColoredPeriod(titleRes),
|
||||||
style = ElementTheme.typography.fontHeadingXlBold,
|
style = ElementTheme.typography.fontHeadingXlBold,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
color = Color.White,
|
color = ElementTheme.colors.textPrimary,
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
val subtitle = when (state.loginAction) {
|
val subtitle = when (state.loginAction) {
|
||||||
|
|
@ -198,7 +203,6 @@ private fun WaitListContent(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (state.loginAction is Async.Success) {
|
if (state.loginAction is Async.Success) {
|
||||||
ElementTheme(darkTheme = true) {
|
|
||||||
Button(
|
Button(
|
||||||
text = stringResource(id = CommonStrings.action_continue),
|
text = stringResource(id = CommonStrings.action_continue),
|
||||||
onClick = { state.eventSink.invoke(WaitListEvents.Continue) },
|
onClick = { state.eventSink.invoke(WaitListEvents.Continue) },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue